diff mbox series

[PULL,for-7.1,04/36] os-posix: Use qemu_log_enabled

Message ID 20220320171135.2704502-5-richard.henderson@linaro.org
State Superseded
Headers show
Series Logging cleanup and per-thread logfiles | expand

Commit Message

Richard Henderson March 20, 2022, 5:11 p.m. UTC
Do not reference qemu_logfile directly;
use the predicate provided by qemu/log.h.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 os-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé March 20, 2022, 9:51 p.m. UTC | #1
On 20/3/22 18:11, Richard Henderson wrote:
> Do not reference qemu_logfile directly;
> use the predicate provided by qemu/log.h.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   os-posix.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Alex Bennée March 23, 2022, 4:41 p.m. UTC | #2
Richard Henderson <richard.henderson@linaro.org> writes:

> Do not reference qemu_logfile directly;
> use the predicate provided by qemu/log.h.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
diff mbox series

Patch

diff --git a/os-posix.c b/os-posix.c
index 24692c8593..20d31fc518 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -292,7 +292,7 @@  void os_setup_post(void)
         dup2(fd, 0);
         dup2(fd, 1);
         /* In case -D is given do not redirect stderr to /dev/null */
-        if (!qemu_logfile) {
+        if (!qemu_log_enabled()) {
             dup2(fd, 2);
         }