[lttng-dev] [PATCH lttng-tools] Fix: report error on session listing

Jonathan Rajotte jonathan.rajotte-julien at efficios.com
Fri Jul 21 15:09:14 UTC 2017


Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
---
 src/bin/lttng/commands/destroy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/lttng/commands/destroy.c b/src/bin/lttng/commands/destroy.c
index 0e603e13..02c7139c 100644
--- a/src/bin/lttng/commands/destroy.c
+++ b/src/bin/lttng/commands/destroy.c
@@ -232,7 +232,8 @@ int cmd_destroy(int argc, const char **argv)
 	/* Recuperate all sessions for further operation */
 	count = lttng_list_sessions(&sessions);
 	if (count < 0) {
-		command_ret = count;
+		ERR("%s", lttng_strerror(count));
+		command_ret = CMD_ERROR;
 		success = 0;
 		goto mi_closing;
 	}
-- 
2.11.0



More information about the lttng-dev mailing list