tools/power/turbostat: fix unrecognized option '-P'
PATCH 1/1 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.
Signed-off-by David Arcari <[email protected]>
--- tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/power/x86/turbostat/turbostat.c +1 -1
@@ -11441,7 +11441,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);
Signature · 1 line
2.53.0
Len Brown
maintainerApplied - thanks!
-Len Brown, Intel Open Source Technology Center