qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL for-7.1 17/36] util/log: Drop call to setvbuf


From: Richard Henderson
Subject: [PULL for-7.1 17/36] util/log: Drop call to setvbuf
Date: Sun, 20 Mar 2022 10:11:16 -0700

Now that the log buffer is flushed after every qemu_log_unlock,
which includes every call to qemu_log, we do not need to force
line buffering (or unbuffering for windows).  Block buffer the
entire loggable unit.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 util/log.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/util/log.c b/util/log.c
index 73597c40c0..be20ae6c1c 100644
--- a/util/log.c
+++ b/util/log.c
@@ -145,12 +145,6 @@ void qemu_set_log(int log_flags, Error **errp)
             logfile->fd = stderr;
         }
 
-#if defined(_WIN32)
-        /* Win32 doesn't support line-buffering, so use unbuffered output. */
-        setvbuf(logfile->fd, NULL, _IONBF, 0);
-#else
-        setvbuf(logfile->fd, NULL, _IOLBF, 0);
-#endif
         log_append = 1;
         qatomic_rcu_set(&qemu_logfile, logfile);
     }
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]