- break;
- case LTTNG_DOMAIN_PYTHON:
- default_chan_name = DEFAULT_PYTHON_CHANNEL_NAME;
- break;
- default:
- /* The switch/case we are in should avoid this else big problem */
- assert(0);
- }
-
- ret = cmd_enable_event(session, &tmp_dom, (char *) default_chan_name,
- &uevent, filter_expression, filter, NULL, wpipe);
- /* We have passed ownership */
- filter_expression = NULL;
- filter = NULL;
- if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) {
- goto error;
- }
-
- /* The wild card * means that everything should be enabled. */
- if (strncmp(event->name, "*", 1) == 0 && strlen(event->name) == 1) {
- ret = event_agent_enable_all(usess, agt, event, filter);
- } else {
- ret = event_agent_enable(usess, agt, event, filter);
- }
- if (ret != LTTNG_OK) {
- goto error;
- }
-
- break;
- }
-#if 0
- case LTTNG_DOMAIN_UST_EXEC_NAME:
- case LTTNG_DOMAIN_UST_PID:
- case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN:
-#endif
- default:
- ret = LTTNG_ERR_UND;
- goto error;
- }
-
- ret = LTTNG_OK;
-
-error:
- free(filter_expression);
- free(filter);
- free(exclusion);
- rcu_read_unlock();
- return ret;
-}
-
-/*
- * Command LTTNG_ENABLE_EVENT for event "*" processed by the client thread.
- */
-static
-int enable_kevent_all(struct ltt_session *session,
- struct lttng_domain *domain, char *channel_name,
- struct lttng_event *event,
- char *filter_expression,
- struct lttng_filter_bytecode *filter, int wpipe)
-{
- int ret;
- struct lttng_channel *attr;
-
- assert(session);
- assert(channel_name);
-
- rcu_read_lock();
-
- switch (domain->type) {
- case LTTNG_DOMAIN_KERNEL:
- {
- struct ltt_kernel_channel *kchan;