From edc52deac624e4641211a325c23da2a73b01a85d Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Thu, 4 Jun 2009 16:24:37 +0200 Subject: perf report: Bail out if there are unrecognized options/arguments Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar --- Documentation/perf_counter/builtin-report.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Documentation/perf_counter/builtin-report.c') diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c index 7beedc6effa4..389ae2569f49 100644 --- a/Documentation/perf_counter/builtin-report.c +++ b/Documentation/perf_counter/builtin-report.c @@ -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(); -- cgit v1.2.2