From: Borislav Petkov <bp@alien8.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@suse.de>
Subject: [PATCH 6/7] perf: Do not allow empty debugfs-dir option
Date: Wed, 20 Feb 2013 16:32:32 +0100 [thread overview]
Message-ID: <1361374353-30385-7-git-send-email-bp@alien8.de> (raw)
In-Reply-To: <1361374353-30385-1-git-send-email-bp@alien8.de>
From: Borislav Petkov <bp@suse.de>
Catch empty --debugfs-dir= option and exit early.
Signed-off-by: Borislav Petkov <bp@suse.de>
---
tools/perf/perf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index f6ba7b73f40e..25f108480ac6 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -199,6 +199,10 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
(*argv)++;
(*argc)--;
} else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) {
+ if (strlen(cmd) == strlen(CMD_DEBUGFS_DIR)) {
+ fprintf(stderr, "No directory given for --debugfs-dir.\n");
+ usage(perf_usage_string);
+ }
perf_debugfs_set_path(cmd + strlen(CMD_DEBUGFS_DIR));
fprintf(stderr, "dir: %s\n", debugfs_mountpoint);
if (envchanged)
--
1.8.1.3.535.ga923c31
next prev parent reply other threads:[~2013-02-20 15:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 15:32 [PATCH 0/7] perf: A tools library Borislav Petkov
2013-02-20 15:32 ` [PATCH 1/7] perf, debugfs: Remove a write-only variable Borislav Petkov
2013-03-21 10:49 ` [tip:perf/core] perf tools: Remove a write-only variable in the debugfs code tip-bot for Borislav Petkov
2013-02-20 15:32 ` [PATCH 2/7] perf: Honor parallel jobs Borislav Petkov
2013-03-21 10:50 ` [tip:perf/core] perf tools: " tip-bot for Borislav Petkov
2013-02-20 15:32 ` [PATCH 3/7] perf: Correct Makefile.include Borislav Petkov
2013-03-21 10:51 ` [tip:perf/core] perf tools: " tip-bot for Borislav Petkov
2013-02-20 15:32 ` [PATCH 4/7] perf: Carve out debugfs Borislav Petkov
2013-03-21 11:00 ` [tip:perf/core] perf tools: Introduce tools/lib/lk library tip-bot for Borislav Petkov
2013-02-20 15:32 ` [PATCH 5/7] perf: Extract perf-specific stuff from debugfs.c Borislav Petkov
2013-03-21 11:01 ` [tip:perf/core] perf tools: " tip-bot for Borislav Petkov
2013-02-20 15:32 ` Borislav Petkov [this message]
2013-02-20 15:32 ` [PATCH 7/7] tools/vm: Switch to liblk library Borislav Petkov
2013-03-21 11:02 ` [tip:perf/core] " tip-bot for Borislav Petkov
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=1361374353-30385-7-git-send-email-bp@alien8.de \
--to=bp@alien8.de \
--cc=acme@redhat.com \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
/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;
as well as URLs for NNTP newsgroup(s).