diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-01 13:37:10 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-01 13:37:10 +0200 |
commit | 91b156f8399cf147e340180fdad06b843fb7dcae (patch) | |
tree | 44de3fe54aef66eaf37f5652efccb4d1e8f2da1d /tools/power/cpupower/utils/cpuidle-set.c | |
parent | 5d0c230f1de8c7515b6567d9afba1f196fb4e2f4 (diff) | |
parent | 99481d2195bfd13a663904e6014887abf46b57c7 (diff) |
Merge tag 'linux-cpupower-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux
Merge cpupower utility update for 6.6-rc1 from Shuah Khan:
"This cpupower update for Linux 6.6-rc1 consists of 2 fixes and
enhancements to add support for amd-pstate active mode driver,
amd_pstate mode change, EPP value change, turbo-boost support,
and is_valid_path API."
* tag 'linux-cpupower-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux:
cpupower: Fix cpuidle_set to accept only numeric values for idle-set operation.
cpupower: Add turbo-boost support in cpupower
cpupower: Add support for amd_pstate mode change
cpupower: Add EPP value change support
cpupower: Add is_valid_path API
cpupower: Recognise amd-pstate active mode driver
cpupower: Bump soname version
Diffstat (limited to 'tools/power/cpupower/utils/cpuidle-set.c')
-rw-r--r-- | tools/power/cpupower/utils/cpuidle-set.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/power/cpupower/utils/cpuidle-set.c b/tools/power/cpupower/utils/cpuidle-set.c index 46158928f9ad..a551d1d4ac51 100644 --- a/tools/power/cpupower/utils/cpuidle-set.c +++ b/tools/power/cpupower/utils/cpuidle-set.c @@ -41,14 +41,6 @@ int cmd_idle_set(int argc, char **argv) cont = 0; break; case 'd': - if (param) { - param = -1; - cont = 0; - break; - } - param = ret; - idlestate = atoi(optarg); - break; case 'e': if (param) { param = -1; @@ -56,7 +48,13 @@ int cmd_idle_set(int argc, char **argv) break; } param = ret; - idlestate = atoi(optarg); + strtol(optarg, &endptr, 10); + if (*endptr != '\0') { + printf(_("Bad value: %s, Integer expected\n"), optarg); + exit(EXIT_FAILURE); + } else { + idlestate = atoi(optarg); + } break; case 'D': if (param) { |