Small fix to lttng list session
[lttng-tools.git] / src / bin / lttng / commands / list.c
index 93758381c9678a9afb5554c9d220d9776f272afd..f1707fc76844d76d68d43c85e5da0df645c627ec 100644 (file)
@@ -475,6 +475,9 @@ static int list_sessions(const char *session_name)
        if (count < 0) {
                ret = count;
                goto error;
+       } else if (count == 0) {
+               MSG("Currently no available tracing session");
+               goto end;
        }
 
        if (session_name == NULL) {
@@ -512,6 +515,7 @@ static int list_sessions(const char *session_name)
                MSG("\nUse lttng list <session_name> for more details");
        }
 
+end:
        return CMD_SUCCESS;
 
 error:
This page took 0.023079 seconds and 4 git commands to generate.