Skip to content
Snippets Groups Projects
Commit ddac0d68 authored by Len Brown's avatar Len Brown
Browse files

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: default avatarLen Brown <len.brown@intel.com>
parent e52966c0
Branches
No related tags found
No related merge requests found
...@@ -423,6 +423,7 @@ int format_counters(struct thread_data *t, struct core_data *c, ...@@ -423,6 +423,7 @@ int format_counters(struct thread_data *t, struct core_data *c,
void flush_stdout() void flush_stdout()
{ {
fputs(output_buffer, stdout); fputs(output_buffer, stdout);
fflush(stdout);
outp = output_buffer; outp = output_buffer;
} }
void flush_stderr() void flush_stderr()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment