Fix: wrong error code returned by kernel_snapshot_record()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 27 Mar 2019 19:42:19 +0000 (15:42 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 29 Mar 2019 16:00:37 +0000 (12:00 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/kernel.c

index b1a3f0b70c8cf9b0868113652c3cbcb23ca4e78a..07525480e8d690ac393e4ebb672e5f9c866d9bf7 100644 (file)
@@ -1022,7 +1022,7 @@ int kernel_snapshot_record(struct ltt_kernel_session *ksess,
                /* Put back the saved consumer output into the session. */
                ksess->consumer = saved_output;
                if (ret < 0) {
-                       ret = LTTNG_ERR_KERN_CONSUMER_FAIL;
+                       ret = LTTNG_ERR_KERN_META_FAIL;
                        goto error_consumer;
                }
 
This page took 0.033393 seconds and 4 git commands to generate.