aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2009-12-15 10:31:28 -0500
committerIngo Molnar <[email protected]>2009-12-15 20:22:00 +0100
commitce11a603ae40e0ad32aeb378cff81e3fdaec390d (patch)
tree69001191cf77ce59e2f301db4b3e350d9ef25b48
parent7e990a51264cb0c1400155ba72d56f5158ccf919 (diff)
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 <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Jim Keniston <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Frank Ch. Eigler <[email protected]> Cc: Jason Baron <[email protected]> Cc: K.Prasad <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Srikar Dronamraju <[email protected]> Cc: systemtap <[email protected]> Cc: DLE <[email protected]> Cc: Frederic Weisbecker <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--tools/perf/builtin-probe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 559eeb42c5e7..919037bc9808 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);