From: Jérémie Galarneau Date: Tue, 29 Oct 2019 19:57:59 +0000 (-0400) Subject: Fix: trace-chunk: log the cause of file open failures X-Git-Tag: v2.12.0-rc1~268 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=625f36cc252f22dc030a20b3abded09a6712ad9b Fix: trace-chunk: log the cause of file open failures 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 --- diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c index 20dbd0a5e..944743e0b 100644 --- a/src/common/trace-chunk.c +++ b/src/common/trace-chunk.c @@ -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;