Add log_info_flush()
If fio dumps status through -USR1 or similar and output is
being stored in a file, the buffering on the file descriptor
by the library can cause is not to see all the output. Ensure
that it gets flushed after dumping stats.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/log.c b/log.c
index d481edf..4822c33 100644
--- a/log.c
+++ b/log.c
@@ -71,6 +71,14 @@
return fwrite(buffer, len, 1, f_out);
}
+int log_info_flush(void)
+{
+ if (is_backend || log_syslog)
+ return 0;
+
+ return fflush(f_out);
+}
+
int log_err(const char *format, ...)
{
char buffer[1024];