提交 0a42d235 编写于 作者: P Prarit Bhargava 提交者: Len Brown

tools/power turbostat: Do not display an error on systems without a cpufreq 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: NPrarit Bhargava <prarit@redhat.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 6de68fe1
...@@ -3465,7 +3465,7 @@ dump_sysfs_pstate_config(void) ...@@ -3465,7 +3465,7 @@ dump_sysfs_pstate_config(void)
base_cpu); base_cpu);
input = fopen(path, "r"); input = fopen(path, "r");
if (input == NULL) { if (input == NULL) {
fprintf(stderr, "NSFOD %s\n", path); fprintf(outf, "NSFOD %s\n", path);
return; return;
} }
fgets(driver_buf, sizeof(driver_buf), input); fgets(driver_buf, sizeof(driver_buf), input);
...@@ -3475,7 +3475,7 @@ dump_sysfs_pstate_config(void) ...@@ -3475,7 +3475,7 @@ dump_sysfs_pstate_config(void)
base_cpu); base_cpu);
input = fopen(path, "r"); input = fopen(path, "r");
if (input == NULL) { if (input == NULL) {
fprintf(stderr, "NSFOD %s\n", path); fprintf(outf, "NSFOD %s\n", path);
return; return;
} }
fgets(governor_buf, sizeof(governor_buf), input); fgets(governor_buf, sizeof(governor_buf), input);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册