]> git.ozlabs.org Git - petitboot/blobdiff - ui/ncurses/generic-main.c
test/parser: Add simple kboot test
[petitboot] / ui / ncurses / generic-main.c
index 5d8debbbacd09ba3a53c9f49ab7e219f11e386aa..365034ceea3c402d1870e33fa627d80c9fcb4539 100644 (file)
@@ -231,6 +231,9 @@ int main(int argc, char *argv[])
        if (strcmp(opts.log_file, "-")) {
                FILE *log = fopen(opts.log_file, "a");
 
+               if (!log)
+                       log = fopen("/dev/null", "a");
+
                assert(log);
                pb_log_set_stream(log);
        } else