X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=250e4d8f6a0f60f73e201dba514fbd640628c33c;hb=676351850cca3295e6450886fa369880465902f5;hp=c22206952160c7bc6e477d4250feed230ed99000;hpb=8005f29ac9f079b844b3e6bb0261e19a76ccd4da;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index c22206952..250e4d8f6 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; } }