X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=28e18644403142592ad2547476d8c41384d2163c;hb=94e60b1f03ae2c3c9450ffc3eca8e052e2c37fb4;hp=afd7cf0b3172c291046710c621625d465c675c3b;hpb=fceb65dfca20fb1e2071a44ada9fe61384d2b890;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index afd7cf0b3..28e186444 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -280,8 +280,8 @@ static void print_event_field(struct lttng_event_field *field) if (!field->field_name[0]) { return; } - MSG("%sfield: %s (%s)", indent8, field->field_name, - field_type(field)); + MSG("%sfield: %s (%s)%s", indent8, field->field_name, + 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) {