Fix: lttng: incorrect domain list printed when no domain is provided
[lttng-tools.git] / src / bin / lttng / commands / enable_channels.c
index 9c84d02634c8612740b914c4a1c6d0d5e806b210..b8c0a5b66e50672befa1ac4847738d2bc9342e7d 100644 (file)
@@ -244,7 +244,7 @@ static int enable_channel(char *session_name)
                void *extended_ptr;
 
                /* Validate channel name's length */
-               if (strlen(channel_name) >= NAME_MAX) {
+               if (strlen(channel_name) >= sizeof(chan_opts.name)) {
                        ERR("Channel name is too long (max. %zu characters)",
                                        sizeof(chan_opts.name) - 1);
                        error = 1;
@@ -647,7 +647,8 @@ int cmd_enable_channels(int argc, const char **argv)
                }
        }
 
-       ret = print_missing_or_multiple_domains(opt_kernel + opt_userspace);
+       ret = print_missing_or_multiple_domains(
+                       opt_kernel + opt_userspace, false);
        if (ret) {
                ret = CMD_ERROR;
                goto end;
This page took 0.024818 seconds and 4 git commands to generate.