obj->u.channel.wakeup_fd =
dup(src->u.channel.wakeup_fd);
if (obj->u.channel.wakeup_fd < 0) {
- ret = errno;
+ ret = -errno;
goto chan_error_wakeup_fd;
}
} else {
obj->u.stream.wakeup_fd =
dup(src->u.stream.wakeup_fd);
if (obj->u.stream.wakeup_fd < 0) {
- ret = errno;
+ ret = -errno;
goto stream_error_wakeup_fd;
}
} else {
obj->u.stream.shm_fd =
dup(src->u.stream.shm_fd);
if (obj->u.stream.shm_fd < 0) {
- ret = errno;
+ ret = -errno;
goto stream_error_shm_fd;
}
} else {
obj->u.counter_global.shm_fd =
dup(src->u.counter_global.shm_fd);
if (obj->u.counter_global.shm_fd < 0) {
- ret = errno;
+ ret = -errno;
goto error_type;
}
}
obj->u.counter_cpu.shm_fd =
dup(src->u.counter_cpu.shm_fd);
if (obj->u.counter_cpu.shm_fd < 0) {
- ret = errno;
+ ret = -errno;
goto error_type;
}
}
int lttng_ust_ctl_get_nr_stream_per_channel(void)
{
- return num_possible_cpus();
+ return get_possible_cpus_array_len();
}
struct lttng_ust_ctl_consumer_channel *
int lttng_ust_ctl_get_nr_cpu_per_counter(void)
{
- return num_possible_cpus();
+ return get_possible_cpus_array_len();
}
struct lttng_ust_ctl_daemon_counter *
return counter->ops->counter_clear(counter->counter, dimension_indexes);
}
+int lttng_ust_ctl_get_version(uint32_t *major, uint32_t *minor,
+ uint32_t *patchlevel) {
+ *major = LTTNG_UST_MAJOR_VERSION;
+ *minor = LTTNG_UST_MINOR_VERSION;
+ *patchlevel = LTTNG_UST_PATCHLEVEL_VERSION;
+ return 0;
+}
+
static
void lttng_ust_ctl_ctor(void)
__attribute__((constructor));