X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fdisable_events.c;h=ff42da0e001c552c6b6f49c3d9a58b3126ecc4c1;hp=e6c8b2d06971a18b901f4eb7a4364ac194e0d22d;hb=679b4943c3b0f451e7f4fbcd804dd8a7a679e253;hpb=d78d661021eb1c5761c631dbd525697769fe638b diff --git a/src/bin/lttng/commands/disable_events.c b/src/bin/lttng/commands/disable_events.c index e6c8b2d06..ff42da0e0 100644 --- a/src/bin/lttng/commands/disable_events.c +++ b/src/bin/lttng/commands/disable_events.c @@ -42,6 +42,7 @@ static pid_t opt_pid; enum { OPT_HELP = 1, OPT_USERSPACE, + OPT_LIST_OPTIONS, }; static struct lttng_handle *handle; @@ -60,6 +61,7 @@ static struct poptOption long_options[] = { #else {"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0}, #endif + {"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL}, {0, 0, 0, 0, 0, 0, 0} }; @@ -71,6 +73,7 @@ static void usage(FILE *ofp) fprintf(ofp, "usage: lttng disable-event NAME[,NAME2,...] [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, " -c, --channel Apply on this channel\n"); fprintf(ofp, " -a, --all-events Disable all tracepoints\n"); @@ -120,7 +123,7 @@ static int disable_events(char *session_name) dom.type = LTTNG_DOMAIN_UST; } else { ERR("Please specify a tracer (-k/--kernel or -u/--userspace)"); - ret = CMD_NOT_IMPLEMENTED; + ret = CMD_UNDEFINED; goto error; } @@ -152,7 +155,7 @@ static int disable_events(char *session_name) #if 0 if (opt_cmd_name != NULL || opt_pid) { MSG("Only supporting tracing all UST processes (-u) for now."); - ret = CMD_NOT_IMPLEMENTED; + ret = CMD_UNDEFINED; goto error; } #endif @@ -211,6 +214,10 @@ int cmd_disable_events(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;