From: Ben Hutchings Date: Sun, 10 Oct 2010 15:11:02 +0000 (+0100) Subject: perf trace: Fix detection of script extension X-Git-Tag: v2.6.37-rc1~83^2~2^2~6 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=d1e95bb5309f98368dd4fbef6ff3a8f573b24506 perf trace: Fix detection of script extension The extension starts with the last dot in the name, not the first. Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra LKML-Reference: <1286723462.2955.206.camel@localhost> Signed-off-by: Ben Hutchings Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 3ea62199ffe1..deda1a93131e 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;