]> git.ozlabs.org Git - petitboot/blobdiff - ui/common/timer.c
utils/pb-console: Support agetty's autologin option
[petitboot] / ui / common / timer.c
index 3c1e8331233b45e8016dd9faa2b8d8a0aaa976f1..23c3e623df7006f318cd5f5322fc65cf3976f830 100644 (file)
@@ -20,7 +20,6 @@
 #include "config.h"
 #endif
 
-#define _GNU_SOURCE
 #include <assert.h>
 #include <limits.h>
 #include <unistd.h>
@@ -36,7 +35,7 @@
 void ui_timer_init(struct waitset *waitset, struct ui_timer *timer,
                unsigned int seconds)
 {
-       pb_log("%s: %u\n", __func__, seconds);
+       pb_log_fn("%u\n", seconds);
        timer->timeout = seconds;
        timer->waitset = waitset;
 }
@@ -50,7 +49,7 @@ static int timer_cb(void *arg)
        struct ui_timer *timer = arg;
 
        timer->handle_timeout(timer);
-       timer->waiter = 0;
+       timer->waiter = NULL;
        return 0;
 }