From: Zbigniew Jędrzejewski-Szmek Date: Fri, 4 Aug 2023 17:08:43 +0000 (+0100) Subject: journalctl: fix loggging invocation X-Git-Tag: v255-rc1~816 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8cb0008977648ba67c35289d81aa2b5a086384f5;p=thirdparty%2Fsystemd.git journalctl: fix loggging invocation Fixup for f882a986c271c3de1c622df0f1586946b4a09fef. --- diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 3424819540a..24b973a2049 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. */