Commit-ID: af9522cf133e9be6da8525a46a9ed7e7659f0e1a Gitweb: http://git.kernel.org/tip/af9522cf133e9be6da8525a46a9ed7e7659f0e1a Author: Wu Fengguang <fengguang.wu@xxxxxxxxx> AuthorDate: Fri, 20 Mar 2009 10:08:10 +0800 Committer: Ingo Molnar <mingo@xxxxxxx> CommitDate: Mon, 6 Apr 2009 09:30:24 +0200 perf_counter tools: when no command is feed to perfstat, display help and exit Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx> Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxx> --- Documentation/perf_counter/kerneltop.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c index 0bd3c13..81a68aa 100644 --- a/Documentation/perf_counter/kerneltop.c +++ b/Documentation/perf_counter/kerneltop.c @@ -387,6 +387,9 @@ int do_perfstat(int argc, char *argv[]) argc -= optind; argv += optind; + if (!argc) + display_help(); + /* * Enable counters and exec the command: */ -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html