X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=dc9dd9241b9847eb12466fefdefa8120314321ad;hp=5755db6379daa5466cd1542a6709bfb97318e724;hb=3c9bd23cc5999729bb49a973d8c1e2bedef939bb;hpb=07bd66356a11f39a5e52d7150c30ce6ee7a9d993 diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 5755db637..dc9dd9241 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -150,25 +150,6 @@ static void list_options(FILE *ofp) } } -/* - * list_commands - * - * List commands line by line. This is mostly for bash auto completion and to - * avoid difficult parsing. - */ -static void list_commands(FILE *ofp) -{ - int i = 0; - struct cmd_struct *cmd = NULL; - - cmd = &commands[i]; - while (cmd->name != NULL) { - fprintf(ofp, "%s\n", cmd->name); - i++; - cmd = &commands[i]; - } -} - /* * clean_exit */ @@ -466,7 +447,7 @@ static int parse_args(int argc, char **argv) ret = 0; goto end; case OPT_DUMP_COMMANDS: - list_commands(stdout); + list_commands(commands, stdout); ret = 0; goto end; default: