aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-17 11:30:00 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-04-20 10:51:11 -0700
commitfb6efecf548fc8ef8cc377f076312b1cf4061cac (patch)
tree3f9c58688837c53036905c0800f80b75a4c322b5 /util
parent90f37362d7d2037a47f0c18ab4a26055acbd7b3a (diff)
downloadqemu-fb6efecf548fc8ef8cc377f076312b1cf4061cac.zip
qemu-fb6efecf548fc8ef8cc377f076312b1cf4061cac.tar.gz
qemu-fb6efecf548fc8ef8cc377f076312b1cf4061cac.tar.bz2
util/log: Drop call to setvbuf
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 <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-21-richard.henderson@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/log.c6
1 files changed, 0 insertions, 6 deletions
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);
}