From: David Goulet Date: Thu, 2 Feb 2012 15:17:16 +0000 (-0500) Subject: Fix return value of list command X-Git-Tag: v2.0-pre19~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=676351850cca3295e6450886fa369880465902f5;p=lttng-tools.git Fix return value of list command Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index da287f5ca..250e4d8f6 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -608,14 +608,12 @@ int cmd_list(int argc, const char **argv) 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; } } @@ -629,9 +627,6 @@ int cmd_list(int argc, const char **argv) /* Domain listing */ if (opt_domain) { ret = list_domains(session_name); - if (ret < 0) { - ret = CMD_ERROR; - } goto end; } @@ -639,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; } @@ -674,7 +668,6 @@ int cmd_list(int argc, const char **argv) ret = list_channels(opt_channel); if (ret < 0) { - ret = CMD_ERROR; goto end; } }