Commit ce012c96 authored by David Arcari's avatar David Arcari Committed by Len Brown
Browse files

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: a0e86c90 ("tools/power turbostat: Add --no-perf option")
Signed-off-by: default avatarDavid Arcari <darcari@redhat.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 3ae6bafa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);