+ /*
+ * Set the stream name before creating it. On error, we don't have to
+ * delete it on the tracer side.
+ */
+ ret = snprintf(stream->name, sizeof(stream->name), "%s_%u",
+ ua_chan->name, ua_chan->streams.count);
+ if (ret < 0) {
+ /* Without the stream name we can't continue using it. */
+ PERROR("snprintf UST create stream");
+ /* Just to make sure we never return -ENOENT. */
+ ret = -1;
+ goto error;
+ }
+