Show python agent install output in verbose builds
[lttng-ust.git] / src / lib / lttng-ust-ctl / ustctl.c
index 94d8484328dc03fa05a3a78b5bb2a6be908355e6..7b6798802e0b04f6058103afa73ae8df4abf3860 100644 (file)
@@ -1257,7 +1257,7 @@ int lttng_ust_ctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **d
                        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 {
@@ -1293,7 +1293,7 @@ int lttng_ust_ctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **d
                        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 {
@@ -1305,7 +1305,7 @@ int lttng_ust_ctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **d
                        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 {
@@ -1344,7 +1344,7 @@ int lttng_ust_ctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **d
                        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;
                        }
                }
@@ -1358,7 +1358,7 @@ int lttng_ust_ctl_duplicate_ust_object_data(struct lttng_ust_abi_object_data **d
                        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;
                        }
                }
@@ -1384,7 +1384,7 @@ error:
 
 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 *
@@ -2904,7 +2904,7 @@ int lttng_ust_ctl_regenerate_statedump(int sock, int handle)
 
 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 *
@@ -3294,6 +3294,14 @@ int lttng_ust_ctl_counter_clear(struct lttng_ust_ctl_daemon_counter *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));
This page took 0.026971 seconds and 4 git commands to generate.