From 8cb0008977648ba67c35289d81aa2b5a086384f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 4 Aug 2023 18:08:43 +0100 Subject: [PATCH] journalctl: fix loggging invocation Fixup for f882a986c271c3de1c622df0f1586946b4a09fef. --- src/journal/journalctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 3424819540..24b973a204 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -2330,7 +2330,7 @@ static int setup_event(Context *c, int fd, sd_event **ret) { return log_error_errno(r, "Failed to add io event source for journal: %m"); if (fstat(STDOUT_FILENO, &st) < 0) - return log_error_errno(r, "Failed to stat stdout: %m"); + return log_error_errno(errno, "Failed to stat stdout: %m"); if (IN_SET(st.st_mode & S_IFMT, S_IFCHR, S_IFIFO, S_IFSOCK)) { /* Also keeps an eye on STDOUT, and exits as soon as we see a POLLHUP on that, i.e. when it is closed. */