Core modification and listing kernel event support
[lttng-tools.git] / liblttngctl / liblttngctl.c
index d8230c618170a15219a96e9e5776d437d17a17af..eb606166c214c9bd850ca7889d961547974ab4cf 100644 (file)
@@ -235,8 +235,16 @@ static int set_session_daemon_path(void)
  */
 int lttng_kernel_enable_event(char *event_name)
 {
-       strncpy(lsm.u.event.event_name, event_name, NAME_MAX);
-       return ask_sessiond(KERNEL_ENABLE_EVENT, NULL);
+       int ret;
+
+       if (event_name == NULL) {
+               ret = ask_sessiond(KERNEL_ENABLE_ALL_EVENT, NULL);
+       } else {
+               strncpy(lsm.u.event.event_name, event_name, NAME_MAX);
+               ret = ask_sessiond(KERNEL_ENABLE_EVENT, NULL);
+       }
+
+       return ret;
 }
 
 /*
This page took 0.022176 seconds and 4 git commands to generate.