lttng-live: fix unchecked mkdir return value
[babeltrace.git] / formats / lttng-live / lttng-live-functions.c
index 34612cf7b59f4e2fc5bca704a962d602b313fdc5..9de53ae5fd96734d714a4ca161a8e2176ab2ed42 100644 (file)
@@ -371,7 +371,6 @@ int lttng_live_attach_session(struct lttng_live_ctx *ctx, uint64_t id)
                        path = strdup(LTTNG_METADATA_PATH_TEMPLATE);
                        path = mkdtemp(path);
                        ctx->session->streams[i].metadata_flag = 1;
-                       mkdir(path, S_IRWXU | S_IRWXG);
                        snprintf(ctx->session->streams[i].path,
                                        sizeof(ctx->session->streams[i].path),
                                        "%s/%s", path,
@@ -380,6 +379,7 @@ int lttng_live_attach_session(struct lttng_live_ctx *ctx, uint64_t id)
                                        O_WRONLY | O_CREAT | O_TRUNC,
                                        S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
                        if (ret < 0) {
+                               perror("open");
                                goto error;
                        }
                        ctx->session->streams[i].fd = ret;
This page took 0.030225 seconds and 4 git commands to generate.