From 625f36cc252f22dc030a20b3abded09a6712ad9b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 29 Oct 2019 15:57:59 -0400 Subject: [PATCH] Fix: trace-chunk: log the cause of file open failures MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/trace-chunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1