summaryrefslogtreecommitdiff
path: root/tools/power
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2012-11-30 01:01:40 -0500
committerLen Brown <len.brown@intel.com>2012-11-30 01:09:43 -0500
commitddac0d6872b15fc5311d44021b8898ec6720bdec (patch)
treeae47e7ded71d155bacaca68b8d082414662b3de5 /tools/power
parente52966c084f9d9ea12be2ac7df801d610d4a19a5 (diff)
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()