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=8c0025c93caaef56541c99f292ea4168a91de686;hp=6a37015ae7bbf9679f8f997eef35495f622827a8;hb=da7587b7850040b371b3a588a9d84535ea6cf530;hpb=49938fb6a42264963829418b06238dd6aa529a32 diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index 6a37015ae..8c0025c93 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "kernel-ctl.h" #include "kernel-ioctl.h" @@ -248,6 +249,20 @@ int kernctl_session_set_name(int fd, const char *name) &session_name); } +int kernctl_session_set_creation_time(int fd, time_t time) +{ + int ret; + struct lttng_kernel_session_creation_time creation_time; + + ret = time_t_to_ISO8601(creation_time.iso8601, sizeof(creation_time.iso8601), time); + if (ret) { + return -1; + } + + return LTTNG_IOCTL_CHECK(fd, LTTNG_KERNEL_SESSION_SET_CREATION_TIME, + &creation_time); +} + int kernctl_create_stream(int fd) { return compat_ioctl_no_arg(fd, LTTNG_KERNEL_OLD_STREAM,