perf kmem: Print usage help for unknown commands
authorPekka Enberg <penberg@cs.helsinki.fi>
Tue, 19 Jan 2010 17:26:11 +0000 (19:26 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 20 Jan 2010 06:20:08 +0000 (07:20 +0100)
This patch fixes "perf kmem" to print usage help instead of
doing nothing.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
LKML-Reference: <1263921971-10782-1-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-kmem.c

index 33bb9df..93c67bf 100644 (file)
@@ -784,7 +784,8 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __used)
                        setup_sorting(&alloc_sort, default_sort_order);
 
                return __cmd_kmem();
-       }
+       } else
+               usage_with_options(kmem_usage, kmem_options);
 
        return 0;
 }