29 lines
859 B
Diff
29 lines
859 B
Diff
From cf22a40e611cd1aeda44bca29d86e5d34ff90dc5 Mon Sep 17 00:00:00 2001
|
|
From: Ben Hutchings <ben@decadent.org.uk>
|
|
Date: Sun, 10 Oct 2010 03:31:00 +0100
|
|
Subject: [PATCH] perf: Fix detection of script extension
|
|
|
|
The extension starts with the last dot in the name, not the first.
|
|
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
---
|
|
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;
|
|
--
|
|
1.7.1
|
|
|