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/core/timer.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/core') 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 ) = { -- cgit v1.2.3-55-g7522