mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
util/log: Remove qemu_log_flush
All uses flush output immediately before or after qemu_log_unlock. Instead of a separate call, move the flush into qemu_log_unlock. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220417183019.755276-20-richard.henderson@linaro.org>
This commit is contained in:
parent
27ea81337f
commit
90f37362d7
8 changed files with 1 additions and 21 deletions
14
util/log.c
14
util/log.c
|
@ -54,6 +54,7 @@ FILE *qemu_log_trylock(void)
|
|||
void qemu_log_unlock(FILE *fd)
|
||||
{
|
||||
if (fd) {
|
||||
fflush(fd);
|
||||
qemu_funlockfile(fd);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
@ -269,19 +270,6 @@ out:
|
|||
g_strfreev(ranges);
|
||||
}
|
||||
|
||||
/* fflush() the log file */
|
||||
void qemu_log_flush(void)
|
||||
{
|
||||
QemuLogFile *logfile;
|
||||
|
||||
rcu_read_lock();
|
||||
logfile = qatomic_rcu_read(&qemu_logfile);
|
||||
if (logfile) {
|
||||
fflush(logfile->fd);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
/* Close the log file */
|
||||
void qemu_log_close(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue