From: Jérémie Galarneau Date: Wed, 27 Mar 2019 19:42:19 +0000 (-0400) Subject: Fix: wrong error code returned by kernel_snapshot_record() X-Git-Tag: v2.11.0-rc2~53 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;ds=sidebyside;h=ac4c07212ead3c601918c21b21eeaace48a95593;hp=7318a78ff9f5695669fe7241319a923bb03c1ff8;p=lttng-tools.git Fix: wrong error code returned by kernel_snapshot_record() On snapshot error, kernel_snapshot_record() can return LTTNG_ERR_KERN_CONSUMER_FAIL which means that the kernel consumer daemon failed to launch. In this path, the appropriate error to return is LTTNG_ERR_KERN_META_FAIL. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 8e972b069..e3118f191 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -1297,7 +1297,7 @@ enum lttng_error_code kernel_snapshot_record(struct ltt_kernel_session *ksess, /* Put back the saved consumer output into the session. */ ksess->consumer = saved_output; if (ret < 0) { - status = LTTNG_ERR_KERN_CONSUMER_FAIL; + status = LTTNG_ERR_KERN_META_FAIL; goto error_consumer; }