X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fdestroy.c;h=3fb5fb232edb16184a4a7574de9b6e623668959f;hp=f26da066977da67bc0fe945d55a7162cfc08196d;hb=60e835ca1712647f501c14bb6b3d20a1c13a110c;hpb=004f3466ecdda5e828d27d4a077a4234f57a2707 diff --git a/src/bin/lttng/commands/destroy.c b/src/bin/lttng/commands/destroy.c index f26da0669..3fb5fb232 100644 --- a/src/bin/lttng/commands/destroy.c +++ b/src/bin/lttng/commands/destroy.c @@ -78,6 +78,7 @@ static int destroy_session(const char *session_name) WARN("Session name %s not found", session_name); break; default: + ERR("%s", lttng_strerror(ret)); break; } goto error; @@ -103,7 +104,11 @@ static int destroy_all_sessions() count = lttng_list_sessions(&sessions); if (count == 0) { MSG("No session found, nothing to do."); + } else if (count < 0) { + ERR("%s", lttng_strerror(ret)); + goto error; } + for (i = 0; i < count; i++) { ret = destroy_session(sessions[i].name); if (ret < 0) {