X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=f1707fc76844d76d68d43c85e5da0df645c627ec;hb=d32fb0935e594470f6a7e9ff0797ef101c500797;hp=93758381c9678a9afb5554c9d220d9776f272afd;hpb=915d047cc8abd8a6e1255dba3e877236f8e8be51;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 93758381c..f1707fc76 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -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 for more details"); } +end: return CMD_SUCCESS; error: