Fix incorrect POPT_ARG_STRING usage
[lttng-tools.git] / lttng / commands / enable_channels.c
index aac5fa4979c9d274b62f72ee61bcdd67c311dd9b..48e83df28a53039ad90f09d34f65ce74d03c3961 100644 (file)
@@ -58,7 +58,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_STRING | POPT_ARGFLAG_OPTIONAL, 0, OPT_USERSPACE, 0, 0},
+       {"userspace",      'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &opt_cmd_name, 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},
        {"discard",        0,   POPT_ARG_NONE, 0, OPT_DISCARD, 0, 0},
@@ -235,7 +235,6 @@ int cmd_enable_channels(int argc, const char **argv)
                        break;
                case OPT_USERSPACE:
                        opt_userspace = 1;
-                       opt_cmd_name = poptGetOptArg(pc);
                        break;
                default:
                        usage(stderr);
This page took 0.023273 seconds and 4 git commands to generate.