From: Srinivas Pandruvada Date: Thu, 5 Mar 2020 22:45:35 +0000 (-0800) Subject: tools/power/x86/intel-speed-select: Print friendly warning for bad command line X-Git-Tag: Ubuntu-5.13.0-19.19~6377^2~16 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4a9603534aff2bc6e36f36144eb25731a888e835;p=mirror_ubuntu-jammy-kernel.git tools/power/x86/intel-speed-select: Print friendly warning for bad command line When user specifies invalid option, display "Unknown Option: ignore", instead of "no match". Also display error for garbage on the command line. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko --- diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index 2a81fb881f04..924cb871d6d2 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -2400,9 +2400,12 @@ static void parse_cmd_args(int argc, int start, char **argv) } break; default: - printf("no match\n"); + printf("Unknown option: ignore\n"); } } + + if (argv[optind]) + printf("Garbage at the end of command: ignore\n"); } static void isst_help(void)