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 <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
Srinivas Pandruvada 2020-03-05 14:45:35 -08:00 committed by Andy Shevchenko
parent b86639e195
commit 4a9603534a
1 changed files with 4 additions and 1 deletions

View File

@ -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)