Skip to content

Commit ce012c9

Browse files
darcarilenb
authored andcommitted
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: a0e86c9 ("tools/power turbostat: Add --no-perf option") Signed-off-by: David Arcari <darcari@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 3ae6baf commit ce012c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/power/x86/turbostat/turbostat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11449,7 +11449,7 @@ void cmdline(int argc, char **argv)
1144911449
}
1145011450
optind = 0;
1145111451

11452-
while ((opt = getopt_long_only(argc, argv, "+C:c:Dde:hi:Jn:N:o:qMST:v", long_options, &option_index)) != -1) {
11452+
while ((opt = getopt_long_only(argc, argv, "+C:c:Dde:hi:Jn:N:o:qMPST:v", long_options, &option_index)) != -1) {
1145311453
switch (opt) {
1145411454
case 'a':
1145511455
parse_add_command(optarg);

0 commit comments

Comments
 (0)