#include <sys/types.h>
#include <unistd.h>
#include <inttypes.h>
-#include <assert.h>
#include <ctype.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <common/utils.h>
#include <common/mi-lttng.h>
+#include <lttng/domain-internal.h>
+
#include "../command.h"
#include "../utils.h"
}
} else {
/* Checked by the caller. */
- assert(0);
+ abort();
}
set_default_attr(&dom);
/* Mi open channels element */
if (lttng_opt_mi) {
- assert(writer);
+ LTTNG_ASSERT(writer);
ret = mi_lttng_channels_open(writer);
if (ret) {
ret = CMD_ERROR;
}
} else {
MSG("%s channel %s enabled for session %s",
- get_domain_str(dom.type), channel_name, session_name);
+ lttng_domain_type_str(dom.type),
+ channel_name, session_name);
success = 1;
}
}
order = get_count_order_u64(chan_opts.attr.subbuf_size);
- assert(order >= 0);
+ LTTNG_ASSERT(order >= 0);
rounded_size = 1ULL << order;
if (rounded_size < chan_opts.attr.subbuf_size) {
ERR("The subbuf size (%" PRIu64 ") is rounded and overflows!",
}
/* Should now be power of 2 */
- assert(!((chan_opts.attr.subbuf_size - 1) & chan_opts.attr.subbuf_size));
+ LTTNG_ASSERT(!((chan_opts.attr.subbuf_size - 1) & chan_opts.attr.subbuf_size));
DBG("Channel subbuf size set to %" PRIu64, chan_opts.attr.subbuf_size);
break;
}
order = get_count_order_u64(chan_opts.attr.num_subbuf);
- assert(order >= 0);
+ LTTNG_ASSERT(order >= 0);
rounded_size = 1ULL << order;
if (rounded_size < chan_opts.attr.num_subbuf) {
ERR("The number of subbuffers (%" PRIu64 ") is rounded and overflows!",
}
/* Should now be power of 2 */
- assert(!((chan_opts.attr.num_subbuf - 1) & chan_opts.attr.num_subbuf));
+ LTTNG_ASSERT(!((chan_opts.attr.num_subbuf - 1) & chan_opts.attr.num_subbuf));
DBG("Channel subbuf num set to %" PRIu64, chan_opts.attr.num_subbuf);
break;
}
}
- 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;