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.11.1~58 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6d7e6cb0b04d89c597b067f8f85224d180af580d;p=lttng-tools.git 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;