From 379c37bafba794b47afcb1e9970b6207fb0eb9f4 Mon Sep 17 00:00:00 2001 From: Alexey Zaytsev Date: Sun, 2 Mar 2008 04:36:50 +0300 Subject: Cleanups Replace a printf with a DBG in timer_rtdsc.c Replace a printf in timer.c with assert Return proper error codes from timer drivers Signed-off-by: Alexey Zaytsev --- src/arch/i386/drivers/timer_rtdsc.c | 5 +++-- src/arch/i386/include/bits/errfile.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/arch') diff --git a/src/arch/i386/drivers/timer_rtdsc.c b/src/arch/i386/drivers/timer_rtdsc.c index 1cd2abead..336e3e6fc 100644 --- a/src/arch/i386/drivers/timer_rtdsc.c +++ b/src/arch/i386/drivers/timer_rtdsc.c @@ -1,6 +1,7 @@ #include #include +#include #include #include #include @@ -78,8 +79,8 @@ static int rtdsc_ts_init(void) } } - printf("RTDSC timer not available on this machine.\n"); - return 1; + DBG("RTDSC timer not available on this machine.\n"); + return -ENODEV; } struct timer rtdsc_ts __timer (01) = { diff --git a/src/arch/i386/include/bits/errfile.h b/src/arch/i386/include/bits/errfile.h index a6f878254..ce58eefd0 100644 --- a/src/arch/i386/include/bits/errfile.h +++ b/src/arch/i386/include/bits/errfile.h @@ -26,6 +26,9 @@ #define ERRFILE_undionly ( ERRFILE_ARCH | ERRFILE_NET | 0x00030000 ) #define ERRFILE_undirom ( ERRFILE_ARCH | ERRFILE_NET | 0x00040000 ) +#define ERRFILE_timer_rtdsc ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00000000 ) +#define ERRFILE_timer_bios ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00010000 ) + /** @} */ #endif /* _BITS_ERRFILE_H */ -- cgit v1.2.3-55-g7522