summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Arcari <darcari@redhat.com>2026-04-21 17:32:17 +0300
committerLen Brown <len.brown@intel.com>2026-04-22 18:26:33 +0300
commitce012c966b518c53475ba9a4e979242d7322d819 (patch)
tree372c8ee08930270c5581823cee8175cd098b2fc1
parent3ae6bafa104d93ddc525b8de547bf66b43fcaf10 (diff)
downloadlinux-ce012c966b518c53475ba9a4e979242d7322d819.tar.xz
tools/power turbostat: Fix unrecognized option '-P'
The '-P' short option (shorthand for --no-perf) is not present in the optstring of the second call to getopt_long_only(). This results in the "unrecognized option" error when the tool reaches the main parsing loop. Add 'P' to the second getopt_long_only() call to ensure it is consistently recognized. Fixes: a0e86c90b83c ("tools/power turbostat: Add --no-perf option") Signed-off-by: David Arcari <darcari@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--tools/power/x86/turbostat/turbostat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index bea574d7aa68..d6b4fd17c5f3 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -11449,7 +11449,7 @@ void cmdline(int argc, char **argv)
}
optind = 0;
- while ((opt = getopt_long_only(argc, argv, "+C:c:Dde:hi:Jn:N:o:qMST:v", long_options, &option_index)) != -1) {
+ while ((opt = getopt_long_only(argc, argv, "+C:c:Dde:hi:Jn:N:o:qMPST:v", long_options, &option_index)) != -1) {
switch (opt) {
case 'a':
parse_add_command(optarg);