mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
journal: fix incorrect errno reporting
pread() returns -1 on error and sets errno. Do not use the -1 as errno.
This commit is contained in:
parent
77ba8233f7
commit
c3753458fc
@ -413,7 +413,7 @@ void server_process_native_file(
|
||||
|
||||
n = pread(fd, p, st.st_size, 0);
|
||||
if (n < 0)
|
||||
log_error_errno(n, "Failed to read file, ignoring: %m");
|
||||
log_error_errno(errno, "Failed to read file, ignoring: %m");
|
||||
else if (n > 0)
|
||||
server_process_native_message(s, p, n, ucred, tv, label, label_len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user