X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.c;fp=src%2Fcommon%2Fkernel-ctl%2Fkernel-ctl.c;h=6a37015ae7bbf9679f8f997eef35495f622827a8;hp=047d40a34d80ea611ff940a78efdb26ebf9127bd;hb=49938fb6a42264963829418b06238dd6aa529a32;hpb=cb0d8c49f51db9be5b72ddefd2c8c4b7ee539c95 diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 047d40a34..6a37015ae 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -238,6 +238,16 @@ int kernctl_session_regenerate_statedump(int fd) return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_STATEDUMP); } +int kernctl_session_set_name(int fd, const char *name) +{ + struct lttng_kernel_session_name session_name; + + strncpy(session_name.name, name, LTTNG_KERNEL_SESSION_NAME_LEN); + + return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_SET_NAME, + &session_name); +} + int kernctl_create_stream(int fd) { return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_STREAM,