X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=blobdiff_plain;f=liblttng-ust-ctl%2Fustctl.c;h=c9e930d045916b82eb7234ca80c07532aab0126e;hp=5069fbb19ce9638de182540c8c4a235ed61171d9;hb=616d3093e1c34557aca7e9f6149338f43cf91886;hpb=42100b84cec40d234370c7c95651141fb5a3ddbc diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 5069fbb1..c9e930d0 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -237,6 +237,36 @@ error: return -EINVAL; } +int ustctl_open_wait_pipe(int sock, + struct lttng_ust_object_data *channel_data) +{ + struct ustcomm_ust_msg lum; + struct ustcomm_ust_reply lur; + int ret; + + if (!channel_data) + return -EINVAL; + + /* Create metadata channel */ + memset(&lum, 0, sizeof(lum)); + lum.handle = channel_data->handle; + lum.cmd = LTTNG_UST_STREAM_PIPE; + ret = ustcomm_send_app_cmd(sock, &lum, &lur); + + if (ret) { + goto error; + } + if (lur.ret_code != USTCOMM_OK) { + ret = lur.ret_code; + goto error; + } + + return 0; + +error: + return ret; +} + int ustctl_create_channel(int sock, int session_handle, struct lttng_ust_channel_attr *chops, struct lttng_ust_object_data **_channel_data)