From: Andi Kleen <andi@firstfloor.org>
To: acme@redhat.com
Cc: mingo@elte.hu, a.p.zijlstra@chello.nl,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 2/2] perf: Handle perf-versionnumber
Date: Thu, 18 Nov 2010 11:51:01 +0100 [thread overview]
Message-ID: <1290077461-12321-3-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1290077461-12321-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
Sometimes it's useful to have multiple perfs with version number
around. This was defeated by the internal command code. Don't
try to handle a number as a internal command.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/perf.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index cdd6c03..c14c0fa 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -444,8 +444,11 @@ int main(int argc, const char **argv)
*
* So we just directly call the internal command handler, and
* die if that one cannot handle it.
+ *
+ * If there is a number after the - don't do this. Assume it's
+ * a perf-VERSIONNUMBER
*/
- if (!prefixcmp(cmd, "perf-")) {
+ if (!prefixcmp(cmd, "perf-") && !isdigit(cmd[5])) {
cmd += 5;
argv[0] = cmd;
handle_internal_command(argc, argv);
--
1.7.1
prev parent reply other threads:[~2010-11-18 10:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-18 10:50 Some perf user space improvements Andi Kleen
2010-11-18 10:51 ` [PATCH 1/2] perf: Fix compilation on gcc 4.0.2 Andi Kleen
2010-11-18 11:15 ` Peter Zijlstra
2010-11-18 13:31 ` Andi Kleen
2010-11-18 13:38 ` Eric Dumazet
2010-11-18 13:40 ` Andi Kleen
2010-11-19 9:51 ` [PATCH 1/2] perf: Fix compilation on gcc 4.0.2 v2 Andi Kleen
2010-11-18 11:53 ` [PATCH 1/2] perf: Fix compilation on gcc 4.0.2 Thomas Gleixner
2010-11-18 10:51 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290077461-12321-3-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox