X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=28e18644403142592ad2547476d8c41384d2163c;hp=696e80e7f2c9a8bfd3e54de5c4caba0024e68b84;hb=c7d620a2a00e1da14a0d06752b9055d9de6017b5;hpb=fb3268e3029673dbb7c6d43b2dcde5e5f9eec07a diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 696e80e7f..28e186444 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -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) {