From: Wu Fengguang Date: Fri, 20 Mar 2009 02:08:10 +0000 (+0800) Subject: perf_counter tools: when no command is feed to perfstat, display help and exit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af9522cf133e9be6da8525a46a9ed7e7659f0e1a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git perf_counter tools: when no command is feed to perfstat, display help and exit Signed-off-by: Wu Fengguang Acked-by: Peter Zijlstra Cc: Paul Mackerras Signed-off-by: Ingo Molnar --- diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c index 0bd3c13150b1..81a68aac137f 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: */