journal: posix_fallocate() does not set errno
manpage says: posix_fallocate() returns zero on success, or an error number on failure. Note that errno is not set.
This commit is contained in:
parent
709f6e46a3
commit
7bb87460e6
|
@ -442,6 +442,7 @@ fail:
|
|||
int server_open_kernel_seqnum(Server *s) {
|
||||
_cleanup_close_ int fd;
|
||||
uint64_t *p;
|
||||
int r;
|
||||
|
||||
assert(s);
|
||||
|
||||
|
@ -455,8 +456,9 @@ int server_open_kernel_seqnum(Server *s) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
|
||||
log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
|
||||
r = posix_fallocate(fd, 0, sizeof(uint64_t));
|
||||
if (r != 0) {
|
||||
log_error_errno(r, "Failed to allocate sequential number file, ignoring: %m");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue