… | |
… | |
829 | | (flags & EIO_SYNC_FILE_RANGE_WAIT_AFTER ? SYNC_FILE_RANGE_WAIT_AFTER : 0); |
829 | | (flags & EIO_SYNC_FILE_RANGE_WAIT_AFTER ? SYNC_FILE_RANGE_WAIT_AFTER : 0); |
830 | } |
830 | } |
831 | |
831 | |
832 | res = sync_file_range (fd, offset, nbytes, flags); |
832 | res = sync_file_range (fd, offset, nbytes, flags); |
833 | |
833 | |
834 | if (res != ENOSYS) |
834 | if (!res || errno != ENOSYS) |
835 | return res; |
835 | return res; |
836 | #endif |
836 | #endif |
837 | |
837 | |
838 | /* even though we could play tricks with the flags, it's better to always |
838 | /* even though we could play tricks with the flags, it's better to always |
839 | * call fdatasync, as thta matches the expectation of it's users best */ |
839 | * call fdatasync, as thta matches the expectation of it's users best */ |
… | |
… | |
1016 | req->result = res; |
1016 | req->result = res; |
1017 | } |
1017 | } |
1018 | |
1018 | |
1019 | #if !(_POSIX_MAPPED_FILES && _POSIX_SYNCHRONIZED_IO) |
1019 | #if !(_POSIX_MAPPED_FILES && _POSIX_SYNCHRONIZED_IO) |
1020 | # undef msync |
1020 | # undef msync |
1021 | # define msync(a,b,c) ENOSYS |
1021 | # define msync(a,b,c) ((errno = ENOSYS), -1) |
1022 | #endif |
1022 | #endif |
1023 | |
1023 | |
1024 | int |
1024 | int |
1025 | eio__mtouch (void *mem, size_t len, int flags) |
1025 | eio__mtouch (void *mem, size_t len, int flags) |
1026 | { |
1026 | { |