]> git.proxmox.com Git - mirror_qemu.git/commitdiff
bsd-user: Use qemu_set_log_filename_flags
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 17 Apr 2022 18:30:08 +0000 (11:30 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 20 Apr 2022 17:51:11 +0000 (10:51 -0700)
Perform all logfile setup in one step.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-29-richard.henderson@linaro.org>

bsd-user/main.c

index ed26fc5acb99ebe2916a06c22ed50e3635c3a7da..aa13eae7f378afa76c41926a4d95efaf5c0ec3e5 100644 (file)
@@ -405,16 +405,16 @@ int main(int argc, char **argv)
     }
 
     /* init debug */
-    qemu_set_log_filename(log_file, &error_fatal);
-    if (log_mask) {
-        int mask;
-
-        mask = qemu_str_to_log_mask(log_mask);
-        if (!mask) {
-            qemu_print_log_usage(stdout);
-            exit(1);
+    {
+        int mask = 0;
+        if (log_mask) {
+            mask = qemu_str_to_log_mask(log_mask);
+            if (!mask) {
+                qemu_print_log_usage(stdout);
+                exit(1);
+            }
         }
-        qemu_set_log(mask, &error_fatal);
+        qemu_set_log_filename_flags(log_file, mask, &error_fatal);
     }
 
     if (optind >= argc) {