diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-12-15 10:31:28 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-15 14:22:00 -0500 |
commit | ce11a603ae40e0ad32aeb378cff81e3fdaec390d (patch) | |
tree | 69001191cf77ce59e2f301db4b3e350d9ef25b48 /tools/perf/builtin-probe.c | |
parent | 7e990a51264cb0c1400155ba72d56f5158ccf919 (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 <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20091215153128.17436.9266.stgit@dhcp-100-2-132.bos.redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r-- | 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 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) | |||
205 | 205 | ||
206 | argc = parse_options(argc, argv, options, probe_usage, | 206 | argc = parse_options(argc, argv, options, probe_usage, |
207 | PARSE_OPT_STOP_AT_NON_OPTION); | 207 | PARSE_OPT_STOP_AT_NON_OPTION); |
208 | if (argc > 0) | 208 | if (argc > 0) { |
209 | if (strcmp(argv[0], "-") == 0) { | ||
210 | pr_warning(" Error: '-' is not supported.\n"); | ||
211 | usage_with_options(probe_usage, options); | ||
212 | } | ||
209 | parse_probe_event_argv(argc, argv); | 213 | parse_probe_event_argv(argc, argv); |
214 | } | ||
210 | 215 | ||
211 | if ((!session.nr_probe && !session.dellist && !session.list_events)) | 216 | if ((!session.nr_probe && !session.dellist && !session.list_events)) |
212 | usage_with_options(probe_usage, options); | 217 | usage_with_options(probe_usage, options); |