[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/26] util/log: re-allow switching away from stderr log file
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 03/26] util/log: re-allow switching away from stderr log file |
|
Date: |
Fri, 6 Oct 2023 13:13:49 +0200 |
From: Fiona Ebner <f.ebner@proxmox.com>
Commit 59bde21374 ("util/log: do not close and reopen log files when
flags are turned off") prevented switching away from stderr on a
subsequent invocation of qemu_set_log_internal(). This prevented
switching away from stderr with the 'logfile' monitor command as well
as an invocation like
> ./qemu-system-x86_64 -trace 'qemu_mutex_lock,file=log'
from opening the specified log file.
Fixes: 59bde21374 ("util/log: do not close and reopen log files when flags are
turned off")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20231004124446.491481-1-f.ebner@proxmox.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
util/log.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/log.c b/util/log.c
index def88a9402b..d36c98da0b4 100644
--- a/util/log.c
+++ b/util/log.c
@@ -298,6 +298,8 @@ static bool qemu_set_log_internal(const char *filename,
bool changed_name,
r->fd = logfile;
qatomic_rcu_set(&global_file, NULL);
call_rcu(r, rcu_close_file, rcu);
+ }
+ if (changed_name) {
logfile = NULL;
}
}
--
2.41.0
- [PULL 00/26] Audio, source reorg, HVF changes for 2023-10-06, Paolo Bonzini, 2023/10/06
- [PULL 01/26] target/i386/hvf: Remove unused includes in 'hvf-i386.h', Paolo Bonzini, 2023/10/06
- [PULL 04/26] target/i386: Check for USER_ONLY definition instead of SOFTMMU one, Paolo Bonzini, 2023/10/06
- [PULL 05/26] softmmu/trace-events: Fix a typo, Paolo Bonzini, 2023/10/06
- [PULL 08/26] fuzz: Correct invalid mentions of 'softmmu' by 'system', Paolo Bonzini, 2023/10/06
- [PULL 03/26] util/log: re-allow switching away from stderr log file,
Paolo Bonzini <=
- [PULL 02/26] sysemu/kvm: Restrict hvf_get_supported_cpuid() to x86 targets, Paolo Bonzini, 2023/10/06
- [PULL 09/26] tcg: Correct invalid mentions of 'softmmu' by 'system-mode', Paolo Bonzini, 2023/10/06
- [PULL 10/26] accel: Rename accel_softmmu* -> accel_system*, Paolo Bonzini, 2023/10/06
- [PULL 12/26] semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user(), Paolo Bonzini, 2023/10/06
- [PULL 07/26] cpu: Correct invalid mentions of 'softmmu' by 'system-mode', Paolo Bonzini, 2023/10/06
- [PULL 16/26] meson: Rename target_softmmu_arch -> target_system_arch, Paolo Bonzini, 2023/10/06
- [PULL 11/26] gdbstub: Rename 'softmmu' -> 'system', Paolo Bonzini, 2023/10/06
- [PULL 06/26] travis-ci: Correct invalid mentions of 'softmmu' by 'system', Paolo Bonzini, 2023/10/06
- [PULL 17/26] system: Rename softmmu/ directory as system/, Paolo Bonzini, 2023/10/06
- [PULL 19/26] cutils: squelch compiler warnings with custom paths, Paolo Bonzini, 2023/10/06