X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttngctl%2Fliblttngctl.c;h=eb606166c214c9bd850ca7889d961547974ab4cf;hp=d8230c618170a15219a96e9e5776d437d17a17af;hb=33a2b85433875769e92ca44a680c46b9498f5174;hpb=c49dc785799508e445e3e386c87f8151eef3c34c diff --git a/liblttngctl/liblttngctl.c b/liblttngctl/liblttngctl.c index d8230c618..eb606166c 100644 --- a/liblttngctl/liblttngctl.c +++ b/liblttngctl/liblttngctl.c @@ -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; } /*