Cleanup: Remove LTTNG_ENABLE_ALL_EVENT and LTTNG_DISABLE_ALL_EVENT
[lttng-tools.git] / src / lib / lttng-ctl / lttng-ctl.c
index c5aada5bec9b46af9e26ce74c606f1a74553a2bf..a398e34d6d7b3c825bb8e4a4e0802412ae96e83f 100644 (file)
@@ -919,10 +919,10 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle,
                                sizeof(lsm.u.enable.channel_name));
        }
 
-       if (ev->name[0] != '\0') {
-               lsm.cmd_type = LTTNG_ENABLE_EVENT;
-       } else {
-               lsm.cmd_type = LTTNG_ENABLE_ALL_EVENT;
+       lsm.cmd_type = LTTNG_ENABLE_EVENT;
+       if (ev->name[0] == '\0') {
+               /* Enable all events */
+               lttng_ctl_copy_string(ev->name, "*", sizeof(ev->name));
        }
 
        lttng_ctl_copy_lttng_domain(&lsm.domain, &handle->domain);
@@ -1081,10 +1081,10 @@ int lttng_disable_event_ext(struct lttng_handle *handle,
                                sizeof(lsm.u.disable.channel_name));
        }
 
-       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));
        }
 
        lttng_ctl_copy_lttng_domain(&lsm.domain, &handle->domain);
This page took 0.026396 seconds and 5 git commands to generate.