switch (event->type) {
case LTTNG_EVENT_ALL:
- if (strlen(event->name) == 1 &&
- !strncmp(event->name, "*", 1)) {
- ret = event_ust_disable_all_tracepoints(usess,
- uchan);
+ /*
+ * An empty event name means that everything
+ * should be disabled.
+ */
+ if (event->name[0] == '\0') {
+ ret = event_ust_disable_all_tracepoints(usess, uchan);
} else {
ret = event_ust_disable_tracepoint(usess, uchan,
event_name);
ret = -LTTNG_ERR_UST_EVENT_NOT_FOUND;
goto error_unlock;
}
- /* The wild card * means that everything should be disabled. */
- if (strncmp(event->name, "*", 1) == 0 && strlen(event->name) == 1) {
+ /*
+ * An empty event name means that everything
+ * should be disabled.
+ */
+ if (event->name[0] == '\0') {
ret = event_agent_disable_all(usess, agt);
} else {
ret = event_agent_disable(usess, agt, event_name);
enable_python_lttng_event $SESSION_NAME $EVENT_NAME
enable_python_lttng_event $SESSION_NAME $EVENT_NAME2
- disable_python_lttng_event $SESSION_NAME '*'
+ disable_python_lttng_event $SESSION_NAME -a
start_lttng_tracing_ok $SESSION_NAME