Skip to content

Commit

Permalink
perf report: Bail out if there are unrecognized options/arguments
Browse files Browse the repository at this point in the history
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Jun 4, 2009
1 parent 13d0ab5 commit edc52de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Documentation/perf_counter/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,10 +1094,16 @@ int cmd_report(int argc, const char **argv, const char *prefix)

page_size = getpagesize();

parse_options(argc, argv, options, report_usage, 0);
argc = parse_options(argc, argv, options, report_usage, 0);

setup_sorting();

/*
* Any (unrecognized) arguments left?
*/
if (argc)
usage_with_options(report_usage, options);

setup_pager();

return __cmd_report();
Expand Down

0 comments on commit edc52de

Please sign in to comment.