X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=ltt-sessiond%2Fkernel-ctl.c;h=3dd146dd4b9792fe6754ef1136a49aef6b111c53;hp=09a3763eb835c30aaaa25fca4081f27d34aeb881;hb=d0254c7c0bb43c62abafdf866b16de0da1ad4d5d;hpb=9f19cc17a942a7089fc209a2527d8b2960c83a00 diff --git a/ltt-sessiond/kernel-ctl.c b/ltt-sessiond/kernel-ctl.c index 09a3763eb..3dd146dd4 100644 --- a/ltt-sessiond/kernel-ctl.c +++ b/ltt-sessiond/kernel-ctl.c @@ -41,7 +41,12 @@ int kernel_add_channel_context(struct ltt_kernel_channel *chan, DBG("Adding context to channel %s", chan->channel->name); ret = kernctl_add_context(chan->fd, ctx); if (ret < 0) { - perror("add context ioctl"); + if (errno != EEXIST) { + perror("add context ioctl"); + } else { + /* If EEXIST, we just ignore the error */ + ret = 0; + } goto error; } @@ -403,6 +408,23 @@ void kernel_wait_quiescent(int fd) } } +/* + * kernel_calibrate + */ +int kernel_calibrate(int fd, struct lttng_kernel_calibrate *calibrate) +{ + int ret; + + ret = kernctl_calibrate(fd, calibrate); + if (ret < 0) { + perror("calibrate ioctl"); + return -1; + } + + return 0; +} + + /* * kernel_metadata_flush_buffer *