- if (ev->name[0] != '\0') {
- lsm.cmd_type = LTTNG_DISABLE_EVENT;
- } else {
- lsm.cmd_type = LTTNG_DISABLE_ALL_EVENT;
+ lsm.cmd_type = LTTNG_DISABLE_EVENT;
+ if (ev->name[0] == '\0') {
+ /* Disable all events */
+ lttng_ctl_copy_string(ev->name, "*", sizeof(ev->name));