Skip to content

Commit

Permalink
tools/power turbostat: Do not display an error on systems without a c…
Browse files Browse the repository at this point in the history
…pufreq driver

Running without a cpufreq driver is a valid case so warnings output in
this case should not be to stderr.

Use outf instead of stderr for these warnings.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Prarit Bhargava authored and Len Brown committed Mar 21, 2019
1 parent 6de68fe commit 0a42d23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -3465,7 +3465,7 @@ dump_sysfs_pstate_config(void)
base_cpu);
input = fopen(path, "r");
if (input == NULL) {
fprintf(stderr, "NSFOD %s\n", path);
fprintf(outf, "NSFOD %s\n", path);
return;
}
fgets(driver_buf, sizeof(driver_buf), input);
Expand All @@ -3475,7 +3475,7 @@ dump_sysfs_pstate_config(void)
base_cpu);
input = fopen(path, "r");
if (input == NULL) {
fprintf(stderr, "NSFOD %s\n", path);
fprintf(outf, "NSFOD %s\n", path);
return;
}
fgets(governor_buf, sizeof(governor_buf), input);
Expand Down

0 comments on commit 0a42d23

Please sign in to comment.