Skip to content

Commit

Permalink
tools/power/x86/intel-speed-select: Print friendly warning for bad co…
Browse files Browse the repository at this point in the history
…mmand 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>
  • Loading branch information
Srinivas Pandruvada authored and Andy Shevchenko committed Mar 20, 2020
1 parent b86639e commit 4a96035
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/power/x86/intel-speed-select/isst-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4a96035

Please sign in to comment.