X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fstart.c;h=b2a4980055f4c480a1798b5c599e872a81c1ac93;hp=8292787731e4bc36360588d5df3ba4b3ab0a52d4;hb=679b4943c3b0f451e7f4fbcd804dd8a7a679e253;hpb=fd4dfcecf4a21f7797d350e8dcd291c6f0c64e86 diff --git a/src/bin/lttng/commands/start.c b/src/bin/lttng/commands/start.c index 829278773..b2a498005 100644 --- a/src/bin/lttng/commands/start.c +++ b/src/bin/lttng/commands/start.c @@ -31,11 +31,13 @@ static char *opt_session_name; enum { OPT_HELP = 1, + OPT_LIST_OPTIONS, }; static struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ {"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0}, + {"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL}, {0, 0, 0, 0, 0, 0, 0} }; @@ -50,6 +52,7 @@ static void usage(FILE *ofp) fprintf(ofp, "get it from the configuration directory (.lttng).\n"); fprintf(ofp, "\n"); fprintf(ofp, " -h, --help Show this help\n"); + fprintf(ofp, " --list-options Simple listing of options\n"); fprintf(ofp, "\n"); } @@ -109,6 +112,10 @@ int cmd_start(int argc, const char **argv) usage(stderr); ret = CMD_SUCCESS; goto end; + case OPT_LIST_OPTIONS: + list_cmd_options(stdout, long_options); + ret = CMD_SUCCESS; + goto end; default: usage(stderr); ret = CMD_UNDEFINED;