Skip to content

Commit

Permalink
perf buildid-list: Fix return value of perf buildid-list -k
Browse files Browse the repository at this point in the history
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: 0b5a793 ("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>
  • Loading branch information
Michael Petlan authored and Arnaldo Carvalho de Melo committed Dec 7, 2015
1 parent 7375e15 commit c8319c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/builtin-buildid-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit c8319c9

Please sign in to comment.