X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=3bac86ecdcd93220653c4119111dc542527d4a49;hb=baa81d3ac6e60bf3caf261342e10a7f85e87e23a;hp=f915a16855f2dccbe2d924344febf77f74bda747;hpb=0c8477c8856d860433b718c4b13704c955ecec68;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index f915a1685..3bac86ecd 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -602,21 +602,18 @@ int cmd_list(int argc, const char **argv) if (!opt_kernel && !opt_userspace) { ret = list_sessions(NULL); if (ret < 0) { - ret = CMD_ERROR; goto end; } } if (opt_kernel) { ret = list_kernel_events(); if (ret < 0) { - ret = CMD_ERROR; goto end; } } if (opt_userspace) { ret = list_ust_events(); if (ret < 0) { - ret = CMD_ERROR; goto end; } } @@ -624,16 +621,12 @@ int cmd_list(int argc, const char **argv) /* List session attributes */ ret = list_sessions(session_name); if (ret < 0) { - ret = CMD_ERROR; goto end; } /* Domain listing */ if (opt_domain) { ret = list_domains(session_name); - if (ret < 0) { - ret = CMD_ERROR; - } goto end; } @@ -641,14 +634,13 @@ int cmd_list(int argc, const char **argv) /* Channel listing */ ret = list_channels(opt_channel); if (ret < 0) { - ret = CMD_ERROR; goto end; } } else { /* We want all domain(s) */ nb_domain = lttng_list_domains(session_name, &domains); if (nb_domain < 0) { - ret = CMD_ERROR; + ret = nb_domain; goto end; } @@ -676,7 +668,6 @@ int cmd_list(int argc, const char **argv) ret = list_channels(opt_channel); if (ret < 0) { - ret = CMD_ERROR; goto end; } }