X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_channels.c;h=e27fe88cecff1a826e62e849539bdaa4187a8a93;hp=5443d78a3c8826138cf9e3813de8ea88936befa8;hb=679b4943c3b0f451e7f4fbcd804dd8a7a679e253;hpb=fd4dfcecf4a21f7797d350e8dcd291c6f0c64e86 diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 5443d78a3..e27fe88ce 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -48,6 +48,7 @@ enum { OPT_SWITCH_TIMER, OPT_READ_TIMER, OPT_USERSPACE, + OPT_LIST_OPTIONS, }; static struct lttng_handle *handle; @@ -70,6 +71,7 @@ static struct poptOption long_options[] = { {"num-subbuf", 0, POPT_ARG_INT, 0, OPT_NUM_SUBBUF, 0, 0}, {"switch-timer", 0, POPT_ARG_INT, 0, OPT_SWITCH_TIMER, 0, 0}, {"read-timer", 0, POPT_ARG_INT, 0, OPT_READ_TIMER, 0, 0}, + {"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL}, {0, 0, 0, 0, 0, 0, 0} }; @@ -81,6 +83,7 @@ static void usage(FILE *ofp) fprintf(ofp, "usage: lttng enable-channel NAME[,NAME2,...] [options] [channel_options]\n"); fprintf(ofp, "\n"); fprintf(ofp, " -h, --help Show this help\n"); + fprintf(ofp, " --list-options Simple listing of options\n"); fprintf(ofp, " -s, --session Apply on session name\n"); fprintf(ofp, " -k, --kernel Apply on the kernel tracer\n"); #if 0 @@ -258,6 +261,10 @@ int cmd_enable_channels(int argc, const char **argv) case OPT_USERSPACE: opt_userspace = 1; break; + case OPT_LIST_OPTIONS: + list_cmd_options(stdout, long_options); + ret = CMD_SUCCESS; + goto end; default: usage(stderr); ret = CMD_UNDEFINED;