X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=f2a61072b7971a44a2254bd600a1a7a85eb4a973;hp=9ea891e92f980d037a47328a83ddeb79c4ec8c26;hb=1624d5b7ba86633d36f3a5c86ea1df5d308c4360;hpb=0e428499a49b2335f4859058739fa2b20f4c410f diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 9ea891e92..f2a61072b 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -1360,6 +1360,8 @@ void lttng_channel_set_default_attr(struct lttng_domain *domain, attr->subbuf_size = default_get_kernel_channel_subbuf_size(); attr->num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM; attr->output = DEFAULT_KERNEL_CHANNEL_OUTPUT; + attr->tracefile_size = DEFAULT_KERNEL_CHANNEL_TRACEFILE_SIZE; + attr->tracefile_count = DEFAULT_KERNEL_CHANNEL_TRACEFILE_COUNT; break; case LTTNG_DOMAIN_UST: #if 0 @@ -1374,6 +1376,8 @@ void lttng_channel_set_default_attr(struct lttng_domain *domain, attr->subbuf_size = default_get_ust_channel_subbuf_size(); attr->num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM; attr->output = DEFAULT_UST_CHANNEL_OUTPUT; + attr->tracefile_size = DEFAULT_UST_CHANNEL_TRACEFILE_SIZE; + attr->tracefile_count = DEFAULT_UST_CHANNEL_TRACEFILE_COUNT; break; default: /* Default behavior: leave set to 0. */ @@ -1455,47 +1459,19 @@ int lttng_set_consumer_url(struct lttng_handle *handle, } /* - * Enable consumer for a session and domain. - * - * Return 0 on success, else a negative value. + * [OBSELETE] */ int lttng_enable_consumer(struct lttng_handle *handle) { - struct lttcomm_session_msg lsm; - - if (handle == NULL) { - return -LTTNG_ERR_INVALID; - } - - lsm.cmd_type = LTTNG_ENABLE_CONSUMER; - - copy_string(lsm.session.name, handle->session_name, - sizeof(lsm.session.name)); - copy_lttng_domain(&lsm.domain, &handle->domain); - - return ask_sessiond(&lsm, NULL); + return -ENOSYS; } /* - * Disable consumer for a session and domain. - * - * Return 0 on success, else a negative value. + * [OBSELETE] */ int lttng_disable_consumer(struct lttng_handle *handle) { - struct lttcomm_session_msg lsm; - - if (handle == NULL) { - return -LTTNG_ERR_INVALID; - } - - lsm.cmd_type = LTTNG_DISABLE_CONSUMER; - - copy_string(lsm.session.name, handle->session_name, - sizeof(lsm.session.name)); - copy_lttng_domain(&lsm.domain, &handle->domain); - - return ask_sessiond(&lsm, NULL); + return -ENOSYS; } /* @@ -1617,7 +1593,7 @@ int _lttng_create_session_ext(const char *name, const char *url, struct lttcomm_session_msg lsm; struct lttng_uri *uris = NULL; - if (name == NULL || datetime == NULL) { + if (name == NULL || datetime == NULL || url == NULL) { return -LTTNG_ERR_INVALID; }