2010-01-19 17:26:15

by Pekka Enberg

[permalink] [raw]
Subject: [PATCH] perf kmem: Print usage help for unknown commands

This patch fixes "perf kmem" to print usage help instead of doing nothing.

Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: Xiao Guangrong <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
---
tools/perf/builtin-kmem.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 33bb9df..93c67bf 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -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;
}
--
1.6.0.4


2010-01-20 07:14:10

by Pekka Enberg

[permalink] [raw]
Subject: [tip:perf/urgent] perf kmem: Print usage help for unknown commands

Commit-ID: b00eca8cd66029128615e8be9a19e284a950c0f2
Gitweb: http://git.kernel.org/tip/b00eca8cd66029128615e8be9a19e284a950c0f2
Author: Pekka Enberg <[email protected]>
AuthorDate: Tue, 19 Jan 2010 19:26:11 +0200
Committer: Ingo Molnar <[email protected]>
CommitDate: Wed, 20 Jan 2010 07:20:08 +0100

perf kmem: Print usage help for unknown commands

This patch fixes "perf kmem" to print usage help instead of
doing nothing.

Signed-off-by: Pekka Enberg <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: Xiao Guangrong <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
tools/perf/builtin-kmem.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 33bb9df..93c67bf 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -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;
}