From fb6efecf548fc8ef8cc377f076312b1cf4061cac Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 17 Apr 2022 11:30:00 -0700 Subject: util/log: Drop call to setvbuf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-Id: <20220417183019.755276-21-richard.henderson@linaro.org> --- util/log.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'util/log.c') diff --git a/util/log.c b/util/log.c index cab0642..caa38e7 100644 --- a/util/log.c +++ b/util/log.c @@ -136,12 +136,6 @@ bool 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); } -- cgit v1.1