} else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
} else {
- print_missing_domain();
- ret = CMD_ERROR;
- goto error;
+ /* Checked by the caller. */
+ assert(0);
}
handle = lttng_create_handle(session_name, &dom);
}
}
+ ret = print_missing_or_multiple_domains(opt_kernel + opt_userspace);
+ if (ret) {
+ ret = CMD_ERROR;
+ goto end;
+ }
+
opt_channels = (char*) poptGetArg(pc);
if (opt_channels == NULL) {
ERR("Missing channel name(s).\n");