summaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2014-05-13 12:41:44 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-17 00:36:37 +0200
commit3fc5a0e51aef4503b6a06ef35409370eed568684 (patch)
treede3e97486fa83a3c73a6037fb8fcc57bf85175de /tools/power
parent8a19cb586708361058e089b7c23b6f3eb33af6c6 (diff)
downloadlinux-3fc5a0e51aef4503b6a06ef35409370eed568684.tar.gz
linux-3fc5a0e51aef4503b6a06ef35409370eed568684.tar.bz2
linux-3fc5a0e51aef4503b6a06ef35409370eed568684.zip
cpupower: cpupower info -b should return 0 on success, not the perf bias value
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/cpupower/utils/cpupower-info.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/power/cpupower/utils/cpupower-info.c b/tools/power/cpupower/utils/cpupower-info.c
index 3f68632c28c7..0ac25772bf63 100644
--- a/tools/power/cpupower/utils/cpupower-info.c
+++ b/tools/power/cpupower/utils/cpupower-info.c
@@ -125,11 +125,12 @@ int cmd_info(int argc, char **argv)
if (params.perf_bias) {
ret = msr_intel_get_perf_bias(cpu);
if (ret < 0) {
- printf(_("Could not read perf-bias value\n"));
- break;
+ fprintf(stderr,
+ _("Could not read perf-bias value[%d]\n"), ret);
+ exit(EXIT_FAILURE);
} else
printf(_("perf-bias: %d\n"), ret);
}
}
- return ret;
+ return 0;
}