journalctl: fix loggging invocation

Fixup for f882a986c2.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-08-04 18:08:43 +01:00
committed by Luca Boccassi
parent 7f878268ff
commit 8cb0008977

View File

@@ -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. */