diff options
| author | Alexey Zaytsev | 2008-03-02 02:36:50 +0100 |
|---|---|---|
| committer | Alexey Zaytsev | 2008-03-02 02:36:50 +0100 |
| commit | 379c37bafba794b47afcb1e9970b6207fb0eb9f4 (patch) | |
| tree | 05d4e08cdf0708093b62c3d6fe8d58b9a036dc9f /src/core | |
| parent | Modify gPXE core and drivers to work with the new timer subsystem (diff) | |
| download | ipxe-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/core')
| -rw-r--r-- | src/core/timer.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/timer.c b/src/core/timer.c index da53e0539..e736f5285 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -53,17 +53,13 @@ static void timer_init(void) struct timer *ts; for (ts = ts_table; ts < ts_table_end; ts++) { - if (ts->init && !ts->init()) { + if (ts->init && ts->init() >= 0) { used_ts = ts; break; } } - if (!used_ts) { - printf("No timer available. This should never happen. Expect gPXE to die soon.\n"); - /* Panic */ - } - + assert(used_ts); } struct init_fn ts_init_fn __init_fn ( INIT_NORMAL ) = { |
