tools/power turbostat: Do not display an error on systems without a cpufreq driver
authorPrarit Bhargava <prarit@redhat.com>
Mon, 13 Aug 2018 12:45:01 +0000 (08:45 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 21 Mar 2019 02:55:44 +0000 (22:55 -0400)
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>
tools/power/x86/turbostat/turbostat.c

index 7d6c14ecf35a841d05f1b3e2e7626ad49068f32e..0716abdb1bd9b556761ed72b20e2985dc3468d28 100644 (file)
@@ -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);
@@ -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);