aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-help.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-03-28 10:19:59 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-03-28 10:19:59 -0400
commitc68677014bace6a4b6ad20f0818e1470d049618f (patch)
tree61adc39b696282ff1fd37e264220ab7eef16db22 /tools/perf/builtin-help.c
parent3906a13a6b4e78fbc0def03a808f091f0dff1b44 (diff)
perf tools: Remove support for command aliases
This came from 'git', but isn't documented anywhere in tools/perf/Documentation/, looks like baggage we can do without, ditch it. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-e7uwkn60t4hmlnwj99ba4t2s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-help.c')
-rw-r--r--tools/perf/builtin-help.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index 7ae238929e95..1eec96a0fa67 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -301,12 +301,6 @@ void list_common_cmds_help(void)
301 } 301 }
302} 302}
303 303
304static int is_perf_command(const char *s)
305{
306 return is_in_cmdlist(&main_cmds, s) ||
307 is_in_cmdlist(&other_cmds, s);
308}
309
310static const char *cmd_to_page(const char *perf_cmd) 304static const char *cmd_to_page(const char *perf_cmd)
311{ 305{
312 char *s; 306 char *s;
@@ -446,7 +440,6 @@ int cmd_help(int argc, const char **argv)
446 "perf help [--all] [--man|--web|--info] [command]", 440 "perf help [--all] [--man|--web|--info] [command]",
447 NULL 441 NULL
448 }; 442 };
449 const char *alias;
450 int rc; 443 int rc;
451 444
452 load_command_list("perf-", &main_cmds, &other_cmds); 445 load_command_list("perf-", &main_cmds, &other_cmds);
@@ -472,12 +465,6 @@ int cmd_help(int argc, const char **argv)
472 return 0; 465 return 0;
473 } 466 }
474 467
475 alias = alias_lookup(argv[0]);
476 if (alias && !is_perf_command(argv[0])) {
477 printf("`perf %s' is aliased to `%s'\n", argv[0], alias);
478 return 0;
479 }
480
481 switch (help_format) { 468 switch (help_format) {
482 case HELP_FORMAT_MAN: 469 case HELP_FORMAT_MAN:
483 rc = show_man_page(argv[0]); 470 rc = show_man_page(argv[0]);