From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Michael Petlan <mpetlan@redhat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 2/5] perf buildid-list: Fix return value of perf buildid-list -k
Date: Mon, 7 Dec 2015 17:06:38 -0300 [thread overview]
Message-ID: <1449518801-18511-3-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1449518801-18511-1-git-send-email-acme@kernel.org>
From: Michael Petlan <mpetlan@redhat.com>
The buildid string length is returned by perf buildid-list -k command.
Since a non-zero return value means an error, perf buildid-list -k cmd
should return 0 when successful instead.
Before:
# perf buildid-list -k
39356d74e96e02346fe0ec1f3f162b6c522bac62
# echo $?
41
After:
# perf buildid-list -k
39356d74e96e02346fe0ec1f3f162b6c522bac62
# echo $?
0
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Fixes: 0b5a7935f3b5 ("perf buildid: Introduce sysfs/filename__sprintf_build_id")
LPU-Reference: 1449080871.24573.145.camel@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-buildid-list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c
index 918b4de29de4..6419f57b0850 100644
--- a/tools/perf/builtin-buildid-list.c
+++ b/tools/perf/builtin-buildid-list.c
@@ -110,7 +110,7 @@ int cmd_buildid_list(int argc, const char **argv,
setup_pager();
if (show_kernel)
- return sysfs__fprintf_build_id(stdout);
+ return !(sysfs__fprintf_build_id(stdout) > 0);
return perf_session__list_build_ids(force, with_hits);
}
--
2.1.0
next prev parent reply other threads:[~2015-12-07 20:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 20:06 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
2015-12-07 20:06 ` [PATCH 1/5] perf buildid-list: Show running kernel build id fix Arnaldo Carvalho de Melo
2015-12-07 20:06 ` Arnaldo Carvalho de Melo [this message]
2015-12-07 20:06 ` [PATCH 3/5] perf hists browser: Add NULL pointer check to prevent crash Arnaldo Carvalho de Melo
2015-12-07 20:06 ` [PATCH 4/5] perf hists browser: Reset selection when refresh Arnaldo Carvalho de Melo
2015-12-07 20:06 ` [PATCH 5/5] perf hists browser: Fix segfault if use symbol filter in cmdline Arnaldo Carvalho de Melo
2015-12-08 5:09 ` [GIT PULL 0/5] perf/urgent fixes Ingo Molnar
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=1449518801-18511-3-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
/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