WARN("Session name %s not found", session_name);
break;
default:
+ ERR("%s", lttng_strerror(ret));
break;
}
goto error;
count = lttng_list_sessions(&sessions);
if (count == 0) {
MSG("No session found, nothing to do.");
+ } else if (count < 0) {
+ ERR("%s", lttng_strerror(ret));
+ goto error;
}
+
for (i = 0; i < count; i++) {
ret = destroy_session(sessions[i].name);
if (ret < 0) {
size = lttng_list_tracepoints(handle, &event_list);
if (size < 0) {
- ERR("Unable to list UST events");
+ ERR("Unable to list UST events: %s", lttng_strerror(size));
lttng_destroy_handle(handle);
return size;
}
size = lttng_list_tracepoint_fields(handle, &event_field_list);
if (size < 0) {
- ERR("Unable to list UST event fields");
+ ERR("Unable to list UST event fields: %s", lttng_strerror(size));
lttng_destroy_handle(handle);
return size;
}
size = lttng_list_tracepoints(handle, &event_list);
if (size < 0) {
- ERR("Unable to list kernel events");
+ ERR("Unable to list kernel events: %s", lttng_strerror(size));
lttng_destroy_handle(handle);
return size;
}
count = lttng_list_events(handle, channel_name, &events);
if (count < 0) {
ret = count;
+ ERR("%s", lttng_strerror(ret));
goto error;
}
/* We had a real error */
ret = count;
ERR("%s", lttng_strerror(ret));
+ break;
}
goto error_channels;
}
/* Listing events per channel */
ret = list_events(channels[i].name);
if (ret < 0) {
- MSG("%s", lttng_strerror(ret));
+ ERR("%s", lttng_strerror(ret));
}
if (chan_found) {
count = lttng_list_domains(session_name, &domains);
if (count < 0) {
ret = count;
+ ERR("%s", lttng_strerror(ret));
goto error;
} else if (count == 0) {
MSG(" None");
nb_domain = lttng_list_domains(session_name, &domains);
if (nb_domain < 0) {
ret = nb_domain;
+ ERR("%s", lttng_strerror(ret));
goto end;
}