From: Len Brown Date: Fri, 30 Nov 2012 06:01:40 +0000 (-0500) Subject: tools/power turbostat: fix output buffering issue X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ddac0d6872b15fc5311d44021b8898ec6720bdec;p=linux-beck.git 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 --- 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()