1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +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:
Michal Schmidt 2015-11-05 13:44:06 +01:00
parent 77ba8233f7
commit c3753458fc

View File

@ -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);
}