From 670ab5d21c7e168c89a36fdd2c69fb7af63d35a1 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 22 Oct 2012 16:12:23 +0900 Subject: perf help: Fix --help for builtins It seems that commit cc5848213329 ("perf help: Remove use of die and handle errors") caused the problem - it changed the initial value of 'help_format' from HELP_FORMAT_MAN to HELP_FORMAT_NONE. This broke the --help option for all builtins, that would produce no output, while 'man perf-top' would work it MANPATH is properly setup. Reported-by: Stephane Eranian Signed-off-by: Namhyung Kim Tested-by: David Ahern Acked-by: David Ahern Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/87r4orj7zc.fsf@sejong.aot.lge.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/builtin-help.c') diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 411ee5664e98..178b88ae3d2f 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c @@ -414,7 +414,7 @@ static int show_html_page(const char *perf_cmd) int cmd_help(int argc, const char **argv, const char *prefix __maybe_unused) { bool show_all = false; - enum help_format help_format = HELP_FORMAT_NONE; + enum help_format help_format = HELP_FORMAT_MAN; struct option builtin_help_options[] = { OPT_BOOLEAN('a', "all", &show_all, "print all available commands"), OPT_SET_UINT('m', "man", &help_format, "show man page", HELP_FORMAT_MAN), -- cgit v1.2.3