- /*
- * The ringbuffer (both in user space and kernel) behave badly in overwrite
- * mode and with less than 2 subbuf so block it right away and send back an
- * invalid attribute error.
- */
- if (attr->attr.overwrite && attr->attr.num_subbuf < 2) {
- ret = LTTNG_ERR_INVALID;
- goto error;
- }
-
if (lttng_strncpy(list[idx].name, output->name,
sizeof(list[idx].name))) {
ret = -LTTNG_ERR_INVALID;
if (lttng_strncpy(list[idx].name, output->name,
sizeof(list[idx].name))) {
ret = -LTTNG_ERR_INVALID;
}
if (output->consumer->type == CONSUMER_DST_LOCAL) {
if (lttng_strncpy(list[idx].ctrl_url,
output->consumer->dst.trace_path,
sizeof(list[idx].ctrl_url))) {
ret = -LTTNG_ERR_INVALID;
}
if (output->consumer->type == CONSUMER_DST_LOCAL) {
if (lttng_strncpy(list[idx].ctrl_url,
output->consumer->dst.trace_path,
sizeof(list[idx].ctrl_url))) {
ret = -LTTNG_ERR_INVALID;
memset(registry->metadata, 0, registry->metadata_alloc_len);
registry->metadata_len = 0;
registry->metadata_version++;
memset(registry->metadata, 0, registry->metadata_alloc_len);
registry->metadata_len = 0;
registry->metadata_version++;
ret = ust_metadata_session_statedump(registry, NULL,
registry->major, registry->minor);
if (ret) {
ret = ust_metadata_session_statedump(registry, NULL,
registry->major, registry->minor);
if (ret) {