[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 28/39] bsd-user: Use qemu_set_log_filename_flags
From: |
Richard Henderson |
Subject: |
[PATCH v3 28/39] bsd-user: Use qemu_set_log_filename_flags |
Date: |
Sun, 17 Apr 2022 11:30:08 -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>
---
bsd-user/main.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index ed26fc5acb..aa13eae7f3 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -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) {
--
2.25.1
- [PATCH v3 37/39] util/log: Rename QemuLogFile to RCUCloseFILE, (continued)
- [PATCH v3 37/39] util/log: Rename QemuLogFile to RCUCloseFILE, Richard Henderson, 2022/04/17
- [PATCH v3 13/39] exec/log: Remove log_disas and log_target_disas, Richard Henderson, 2022/04/17
- [PATCH v3 07/39] util/log: Rename qemu_log_lock to qemu_log_trylock, Richard Henderson, 2022/04/17
- [PATCH v3 22/39] linux-user: Expand log_page_dump inline, Richard Henderson, 2022/04/17
- [PATCH v3 23/39] tests/unit: Do not reference QemuLogFile directly, Richard Henderson, 2022/04/17
- [PATCH v3 21/39] bsd-user: Expand log_page_dump inline, Richard Henderson, 2022/04/17
- [PATCH v3 26/39] sysemu/os-win32: Test for and use _lock_file/_unlock_file, Richard Henderson, 2022/04/17
- [PATCH v3 19/39] util/log: Remove qemu_log_flush, Richard Henderson, 2022/04/17
- [PATCH v3 30/39] softmmu: Use qemu_set_log_filename_flags, Richard Henderson, 2022/04/17
- [PATCH v3 31/39] util/log: Remove qemu_log_close, Richard Henderson, 2022/04/17
- [PATCH v3 28/39] bsd-user: Use qemu_set_log_filename_flags,
Richard Henderson <=
- [PATCH v3 02/39] target/hexagon: Remove qemu_set_log in hexagon_translate_init, Richard Henderson, 2022/04/17
- [PATCH v3 04/39] util/log: Pass Error pointer to qemu_set_log, Richard Henderson, 2022/04/17
- [PATCH v3 15/39] target/nios2: Remove log_cpu_state from reset, Richard Henderson, 2022/04/17
- [PATCH v3 24/39] include/exec/log: Do not reference QemuLogFile directly, Richard Henderson, 2022/04/17
- [PATCH v3 29/39] linux-user: Use qemu_set_log_filename_flags, Richard Henderson, 2022/04/17
- [PATCH v3 35/39] util/log: Hoist the eval of is_daemonized in qemu_set_log_internal, Richard Henderson, 2022/04/17
- [PATCH v3 34/39] util/log: Rename qemu_logfile_mutex to global_mutex, Richard Henderson, 2022/04/17
- [PATCH v3 36/39] util/log: Combine two logfile closes, Richard Henderson, 2022/04/17
- [PATCH v3 39/39] util/log: Support per-thread log files, Richard Henderson, 2022/04/17