diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2010-10-10 11:11:02 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-10-23 13:31:20 -0400 |
commit | d1e95bb5309f98368dd4fbef6ff3a8f573b24506 (patch) | |
tree | 08ab235d89d8caf267263c133b5ad27801b494de /tools | |
parent | 44e668c6faa9a6c477a32788e7e88f0754c54a4e (diff) |
perf trace: Fix detection of script extension
The extension starts with the last dot in the name, not the first.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1286723462.2955.206.camel@localhost>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 3ea62199ffe..deda1a93131 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -282,7 +282,7 @@ static int parse_scriptname(const struct option *opt __used, | |||
282 | script++; | 282 | script++; |
283 | } else { | 283 | } else { |
284 | script = str; | 284 | script = str; |
285 | ext = strchr(script, '.'); | 285 | ext = strrchr(script, '.'); |
286 | if (!ext) { | 286 | if (!ext) { |
287 | fprintf(stderr, "invalid script extension"); | 287 | fprintf(stderr, "invalid script extension"); |
288 | return -1; | 288 | return -1; |