mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 03:55:46 +03:00
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>
This commit is contained in:
@@ -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 ) = {
|
||||
|
||||
Reference in New Issue
Block a user