X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_channels.c;h=673fecfc57a0aeb394135b3b92a9e2c1d350ec82;hp=101617fa876be0b09464df81cd06e419f9ffb1a6;hb=8e32b63b5ad14e5a647ee580f618762c439a0d47;hpb=1f345e94095b14037b3f39bc0b48db6b6543efd6 diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 101617fa8..673fecfc5 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -15,7 +15,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include @@ -220,9 +219,8 @@ static int enable_channel(char *session_name) dom.buf_type = LTTNG_BUFFER_PER_UID; } } else { - print_missing_domain(); - ret = CMD_ERROR; - goto error; + /* Checked by the caller. */ + assert(0); } set_default_attr(&dom); @@ -570,6 +568,12 @@ int cmd_enable_channels(int argc, const char **argv) } } + ret = print_missing_or_multiple_domains(opt_kernel + opt_userspace); + if (ret) { + ret = CMD_ERROR; + goto end; + } + /* Mi check */ if (lttng_opt_mi) { writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);