Skip to content

Commit

Permalink
perf trace: Fix detection of script extension
Browse files Browse the repository at this point in the history
The extension starts with the last dot in the name, not the first.

Cc: Ingo Molnar <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
LKML-Reference: <1286723462.2955.206.camel@localhost>
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
bwhacks authored and acmel committed Oct 23, 2010
1 parent 44e668c commit d1e95bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static int parse_scriptname(const struct option *opt __used,
script++;
} else {
script = str;
ext = strchr(script, '.');
ext = strrchr(script, '.');
if (!ext) {
fprintf(stderr, "invalid script extension");
return -1;
Expand Down

0 comments on commit d1e95bb

Please sign in to comment.