|
From: tip-bot f. M. H. <mhi...@re...> - 2009-12-15 19:28:39
|
Commit-ID: ce11a603ae40e0ad32aeb378cff81e3fdaec390d Gitweb: http://git.kernel.org/tip/ce11a603ae40e0ad32aeb378cff81e3fdaec390d Author: Masami Hiramatsu <mhi...@re...> AuthorDate: Tue, 15 Dec 2009 10:31:28 -0500 Committer: Ingo Molnar <mi...@el...> CommitDate: Tue, 15 Dec 2009 20:22:00 +0100 perf probe: Check hyphen only argument Check hyphen only command argument, because perf-probe doesn't support event recording feature yet. e.g. # perf probe - Error: '-' is not supported. Signed-off-by: Masami Hiramatsu <mhi...@re...> Cc: Paul Mackerras <pa...@sa...> Cc: Arnaldo Carvalho de Melo <ac...@re...> Cc: Steven Rostedt <ro...@go...> Cc: Jim Keniston <jke...@us...> Cc: Ananth N Mavinakayanahalli <an...@in...> Cc: Christoph Hellwig <hc...@in...> Cc: Frank Ch. Eigler <fc...@re...> Cc: Jason Baron <jb...@re...> Cc: K.Prasad <pr...@li...> Cc: Peter Zijlstra <pe...@in...> Cc: Srikar Dronamraju <sr...@li...> Cc: systemtap <sys...@so...> Cc: DLE <dle...@li...> Cc: Frederic Weisbecker <fwe...@gm...> LKML-Reference: <200...@dh...> Signed-off-by: Ingo Molnar <mi...@el...> --- tools/perf/builtin-probe.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 559eeb4..919037b 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -205,8 +205,13 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) argc = parse_options(argc, argv, options, probe_usage, PARSE_OPT_STOP_AT_NON_OPTION); - if (argc > 0) + if (argc > 0) { + if (strcmp(argv[0], "-") == 0) { + pr_warning(" Error: '-' is not supported.\n"); + usage_with_options(probe_usage, options); + } parse_probe_event_argv(argc, argv); + } if ((!session.nr_probe && !session.dellist && !session.list_events)) usage_with_options(probe_usage, options); |