[tip:perf/core] perf trace: Fix detection of script extension

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tip-bot for Ben Hutchings
Date: Sunday, October 24, 2010 - 2:43 am

Commit-ID:  d1e95bb5309f98368dd4fbef6ff3a8f573b24506
Gitweb:     http://git.kernel.org/tip/d1e95bb5309f98368dd4fbef6ff3a8f573b24506
Author:     Ben Hutchings <ben@decadent.org.uk>
AuthorDate: Sun, 10 Oct 2010 16:11:02 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Sat, 23 Oct 2010 15:31:20 -0200

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>
---
 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 3ea6219..deda1a9 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,
 		script++;
 	} else {
 		script = str;
-		ext = strchr(script, '.');
+		ext = strrchr(script, '.');
 		if (!ext) {
 			fprintf(stderr, "invalid script extension");
 			return -1;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/2] perf: Fix detection of script extension, Ben Hutchings, (Sun Oct 10, 8:11 am)
[tip:perf/core] perf trace: Use $PERF_EXEC_PATH in canned ..., tip-bot for Ben Hutc ..., (Sun Oct 24, 2:43 am)
[tip:perf/core] perf trace: Fix detection of script extension, tip-bot for Ben Hutc ..., (Sun Oct 24, 2:43 am)