X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng%2Fcommands%2Fdisable_events.c;h=13ebd6c3acff763b235bfc4748fab0404716c81c;hb=5450ed5091dd727e58b412b6b9a6cb94ae74b609;hp=f30a2b28ac4ea629f7ea0266b6574b3d4e90630a;hpb=f84efadf55274918ca038a4e06e0a8af1a320654;p=lttng-tools.git diff --git a/lttng/commands/disable_events.c b/lttng/commands/disable_events.c index f30a2b28a..13ebd6c3a 100644 --- a/lttng/commands/disable_events.c +++ b/lttng/commands/disable_events.c @@ -31,11 +31,11 @@ static char *opt_event_list; static char *opt_kernel; -static char *opt_cmd_name; static char *opt_channel_name; static char *opt_session_name; static int opt_pid_all; static int opt_userspace; +static char *opt_cmd_name; static int opt_disable_all; static pid_t opt_pid; @@ -53,7 +53,7 @@ static struct poptOption long_options[] = { {"all-events", 'a', POPT_ARG_VAL, &opt_disable_all, 1, 0, 0}, {"channel", 'c', POPT_ARG_STRING, &opt_channel_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}, {0, 0, 0, 0, 0, 0, 0} @@ -182,7 +182,6 @@ int cmd_disable_events(int argc, const char **argv) goto end; case OPT_USERSPACE: opt_userspace = 1; - opt_cmd_name = poptGetOptArg(pc); break; default: usage(stderr);