]> git.ozlabs.org Git - petitboot/blobdiff - lib/log/log.c
config: Add boot_device member to config
[petitboot] / lib / log / log.c
index b250a9ec26e71beea0761a44ce0efac729b50b2b..44543d03b4ce900368cbeb593e2f08feaf855059 100644 (file)
@@ -12,8 +12,7 @@ static void __log(const char *fmt, va_list ap)
        if (!logf)
                return;
        vfprintf(logf, fmt, ap);
-       if (debug)
-               fflush(logf);
+       fflush(logf);
 }
 
 void pb_log(const char *fmt, ...)
@@ -42,6 +41,11 @@ void __pb_log_init(FILE *fp, bool _debug)
        debug = _debug;
 }
 
+void pb_log_set_debug(bool _debug)
+{
+       debug = _debug;
+}
+
 FILE *pb_log_get_stream(void)
 {
        static FILE *null_stream;