From ddac0d6872b15fc5311d44021b8898ec6720bdec Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 30 Nov 2012 01:01:40 -0500 Subject: [PATCH] tools/power turbostat: fix output buffering issue In periodic mode, turbostat writes to stdout, but users were un-able to re-direct stdout, eg. turbostat > outputfile would result in an empty outputfile. Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 77e76b11382f..cb031472bede 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -423,6 +423,7 @@ done: void flush_stdout() { fputs(output_buffer, stdout); + fflush(stdout); outp = output_buffer; } void flush_stderr() -- 2.39.5