summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorAlexey Zaytsev2008-03-02 02:36:50 +0100
committerAlexey Zaytsev2008-03-02 02:36:50 +0100
commit379c37bafba794b47afcb1e9970b6207fb0eb9f4 (patch)
tree05d4e08cdf0708093b62c3d6fe8d58b9a036dc9f /src/arch
parentModify gPXE core and drivers to work with the new timer subsystem (diff)
downloadipxe-379c37bafba794b47afcb1e9970b6207fb0eb9f4.tar.gz
ipxe-379c37bafba794b47afcb1e9970b6207fb0eb9f4.tar.xz
ipxe-379c37bafba794b47afcb1e9970b6207fb0eb9f4.zip
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 <alexey.zaytsev@gmail.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/drivers/timer_rtdsc.c5
-rw-r--r--src/arch/i386/include/bits/errfile.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/i386/drivers/timer_rtdsc.c b/src/arch/i386/drivers/timer_rtdsc.c
index 1cd2abea..336e3e6f 100644
--- a/src/arch/i386/drivers/timer_rtdsc.c
+++ b/src/arch/i386/drivers/timer_rtdsc.c
@@ -1,6 +1,7 @@
#include <gpxe/init.h>
#include <gpxe/timer.h>
+#include <errno.h>
#include <stdio.h>
#include <bits/cpu.h>
#include <bits/timer2.h>
@@ -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 a6f87825..ce58eefd 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 */