X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Fcommands%2Fdisable_channels.c;fp=lttng%2Fcommands%2Fdisable_channels.c;h=262165eb3f0162f09580b83f9913f621df10c10f;hp=9a816e3efb0bc652663492d224d038dc05dba253;hb=eeac7d463a09ac924c3c98f1fa5fa6c19748b4de;hpb=509cbaf89ee874b312c89ca8276b13569b49c4c5 diff --git a/lttng/commands/disable_channels.c b/lttng/commands/disable_channels.c index 9a816e3ef..262165eb3 100644 --- a/lttng/commands/disable_channels.c +++ b/lttng/commands/disable_channels.c @@ -34,6 +34,7 @@ static char *opt_kernel; static char *opt_session_name; static int opt_pid_all; static int opt_userspace; +static char *opt_cmd_name; static pid_t opt_pid; enum { @@ -48,7 +49,7 @@ static struct poptOption long_options[] = { {"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0}, {"session", 's', POPT_ARG_STRING, &opt_session_name, 0, 0, 0}, {"kernel", 'k', POPT_ARG_VAL, &opt_kernel, 1, 0, 0}, - {"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0}, + {"userspace", 'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, 0, OPT_USERSPACE, 0, 0}, {"all", 0, POPT_ARG_VAL, &opt_pid_all, 1, 0, 0}, {"pid", 'p', POPT_ARG_INT, &opt_pid, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0} @@ -147,6 +148,7 @@ int cmd_disable_channels(int argc, const char **argv) goto end; case OPT_USERSPACE: opt_userspace = 1; + opt_cmd_name = poptGetOptArg(pc); break; default: usage(stderr);