Fix: trace-chunk: log the cause of file open failures
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 29 Oct 2019 19:57:59 +0000 (15:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 29 Oct 2019 19:57:59 +0000 (15:57 -0400)
Use the PERROR macro instead of ERR to obtain the "errno" message
when an error occurs while opening a file relative to a trace
chunk.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/trace-chunk.c

index 20dbd0a5ea933a853d328332d4c04def960fd917..944743e0b585ba9458ba9e681aa974f80335fd56 100644 (file)
@@ -840,7 +840,7 @@ enum lttng_trace_chunk_status lttng_trace_chunk_open_file(
                        chunk->credentials.value.use_current_user ?
                                        NULL : &chunk->credentials.value.user);
        if (ret < 0) {
-               ERR("Failed to open file relative to trace chunk file_path = \"%s\", flags = %d, mode = %d",
+               PERROR("Failed to open file relative to trace chunk file_path = \"%s\", flags = %d, mode = %d",
                                file_path, flags, (int) mode);
                status = LTTNG_TRACE_CHUNK_STATUS_ERROR;
                goto end;
This page took 0.028138 seconds and 4 git commands to generate.