X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=lib%2Flog%2Flog.c;h=44543d03b4ce900368cbeb593e2f08feaf855059;hp=b250a9ec26e71beea0761a44ce0efac729b50b2b;hb=ae3c354e844698bdb4ed35a6845aa9dca1e9205f;hpb=307b4b091e0bc298964e90888bf179431e32c134 diff --git a/lib/log/log.c b/lib/log/log.c index b250a9e..44543d0 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -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;