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;
{"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}
{
int err, ret = CMD_SUCCESS;
char *event_name, *channel_name = NULL;
- struct lttng_event ev;
struct lttng_domain dom;
if (opt_channel_name == NULL) {
DBG("Disabling kernel event %s for channel %s",
event_name, channel_name);
- /* Copy name and type of the event */
- strncpy(ev.name, event_name, LTTNG_SYMBOL_NAME_LEN);
- ev.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
ret = lttng_disable_event(handle, event_name, channel_name);
if (ret < 0) {
MSG("Unable to disable event %s for channel %s",
goto end;
case OPT_USERSPACE:
opt_userspace = 1;
- opt_cmd_name = poptGetOptArg(pc);
break;
default:
usage(stderr);