summaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2012-11-30 07:01:40 +0100
committerLen Brown <len.brown@intel.com>2012-11-30 07:09:43 +0100
commitddac0d6872b15fc5311d44021b8898ec6720bdec (patch)
treeae47e7ded71d155bacaca68b8d082414662b3de5 /tools/power
parenttools/power turbostat: prevent infinite loop on migration error path (diff)
downloadlinux-ddac0d6872b15fc5311d44021b8898ec6720bdec.tar.xz
linux-ddac0d6872b15fc5311d44021b8898ec6720bdec.zip
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 <len.brown@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/turbostat/turbostat.c1
1 files changed, 1 insertions, 0 deletions
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()