X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Flib%2Flttng-ust-ctl%2Fustctl.c;h=0e6dc06edfa51ba6eea1e7e7519e805d5a2c5a5a;hb=d9c66e5afd887aca6f8f914ec469b53109d9bd7a;hp=784cb75db0b46a7c42a9b506199a3e10e2baf343;hpb=5fb2fe0679458e65ebdd52b69d6359c082664ce6;p=lttng-ust.git diff --git a/src/lib/lttng-ust-ctl/ustctl.c b/src/lib/lttng-ust-ctl/ustctl.c index 784cb75d..0e6dc06e 100644 --- a/src/lib/lttng-ust-ctl/ustctl.c +++ b/src/lib/lttng-ust-ctl/ustctl.c @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: GPL-2.0-only * - * Copyright (C) 2011 Julien Desfossez + * Copyright (C) 2011 EfficiOS Inc. * Copyright (C) 2011-2013 Mathieu Desnoyers */ @@ -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 * @@ -2901,7 +2901,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 *