Browse Source

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>
Ben Hutchings 14 năm trước cách đây
mục cha
commit
d1e95bb530
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      tools/perf/builtin-trace.c

+ 1 - 1
tools/perf/builtin-trace.c

@@ -282,7 +282,7 @@ static int parse_scriptname(const struct option *opt __used,
 		script++;
 		script++;
 	} else {
 	} else {
 		script = str;
 		script = str;
-		ext = strchr(script, '.');
+		ext = strrchr(script, '.');
 		if (!ext) {
 		if (!ext) {
 			fprintf(stderr, "invalid script extension");
 			fprintf(stderr, "invalid script extension");
 			return -1;
 			return -1;