Signed-off-by: David Goulet <dgoulet@efficios.com>
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;
}
}
/* Domain listing */
if (opt_domain) {
ret = list_domains(session_name);
- if (ret < 0) {
- ret = CMD_ERROR;
- }
goto end;
}
/* 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;
}
ret = list_channels(opt_channel);
if (ret < 0) {
- ret = CMD_ERROR;
goto end;
}
}