Skip to content

Commit d1e95bb

Browse files
bwhacksacmel
authored andcommitted
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>
1 parent 44e668c commit d1e95bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/perf/builtin-trace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static int parse_scriptname(const struct option *opt __used,
282282
script++;
283283
} else {
284284
script = str;
285-
ext = strchr(script, '.');
285+
ext = strrchr(script, '.');
286286
if (!ext) {
287287
fprintf(stderr, "invalid script extension");
288288
return -1;

0 commit comments

Comments
 (0)