From: Andi Kleen <andi@firstfloor.org>
To: a.p.zijlstra@chello.nl, mingo@elte.hu, fweisbec@gmail.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] [2/2] perf: allow installing as perf-versionnumber
Date: Sun, 6 Dec 2009 15:07:31 +0100 (CET) [thread overview]
Message-ID: <20091206140731.93F1AB1839@basil.firstfloor.org> (raw)
In-Reply-To: <20091206307.542816612@firstfloor.org>
Right now installing a given perf binary as perf-versionnumber doesn't
work because perf internally tries to dispatch a "versionnumber" command.
Add a special case to not dispatch commands starting with a digit.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/perf/perf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: linux-2.6.32-ak/tools/perf/perf.c
===================================================================
--- linux-2.6.32-ak.orig/tools/perf/perf.c
+++ linux-2.6.32-ak/tools/perf/perf.c
@@ -441,8 +441,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.
+ *
+ * A special case is a digit option: this might be perf-versionnumber
+ * Just ignore that.
*/
- if (!prefixcmp(cmd, "perf-")) {
+ if (!prefixcmp(cmd, "perf-") && !isdigit(cmd[5])) {
cmd += 5;
argv[0] = cmd;
handle_internal_command(argc, argv);
next prev parent reply other threads:[~2009-12-06 14:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 14:07 [PATCH] [1/2] perf: Make location of kernel source configurable Andi Kleen
2009-12-06 14:07 ` Andi Kleen [this message]
2009-12-07 1:33 ` Frederic Weisbecker
2009-12-07 5:25 ` Ingo Molnar
2009-12-07 5:31 ` Frederic Weisbecker
2009-12-07 6:18 ` Frederic Weisbecker
2009-12-07 7:07 ` Ingo Molnar
2009-12-07 10:32 ` Andi Kleen
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=20091206140731.93F1AB1839@basil.firstfloor.org \
--to=andi@firstfloor.org \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.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
Powered by JetHome