Fix: add missing goto pending if data is inflight
[lttng-tools.git] / src / bin / lttng / commands / list.c
index 0467cc6ba32d6afc828bcaeec34e31c0b58ed416..28e18644403142592ad2547476d8c41384d2163c 100644 (file)
@@ -281,7 +281,7 @@ static void print_event_field(struct lttng_event_field *field)
                return;
        }
        MSG("%sfield: %s (%s)%s", indent8, field->field_name,
-               field_type(field), field->nowrite ? "" : " [no write]");
+               field_type(field), field->nowrite ? " [no write]" : "");
 }
 
 /*
@@ -521,11 +521,17 @@ static int list_channels(const char *channel_name)
 
        count = lttng_list_channels(handle, &channels);
        if (count < 0) {
-               ret = count;
+               switch (-count) {
+               case LTTNG_ERR_KERN_CHAN_NOT_FOUND:
+                       ret = CMD_SUCCESS;
+                       WARN("No kernel channel");
+                       break;
+               default:
+                       /* We had a real error */
+                       ret = count;
+                       ERR("%s", lttng_strerror(ret));
+               }
                goto error_channels;
-       } else if (count == 0) {
-               ERR("Channel %s not found", channel_name);
-               goto error;
        }
 
        if (channel_name == NULL) {
This page took 0.026118 seconds and 5 git commands to generate.