lttng UI: read opt_cmd_name opt arg for each command
[lttng-tools.git] / lttng / commands / disable_channels.c
index 9a816e3efb0bc652663492d224d038dc05dba253..262165eb3f0162f09580b83f9913f621df10c10f 100644 (file)
@@ -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);
This page took 0.022882 seconds and 4 git commands to generate.