mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-01 12:45:34 +00:00
Merge pull request #1184 from c4rlo/linux-syncfile-errno-fix
platform.linux: small SyncFile error handling fix
This commit is contained in:
commit
d9a14e3658
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ cdef _sync_file_range(fd, offset, length, flags):
|
|||
assert offset & PAGE_MASK == 0, "offset %d not page-aligned" % offset
|
||||
assert length & PAGE_MASK == 0, "length %d not page-aligned" % length
|
||||
if sync_file_range(fd, offset, length, flags) != 0:
|
||||
raise OSError(errno, os.strerror(errno))
|
||||
raise OSError(errno.errno, os.strerror(errno.errno))
|
||||
os.posix_fadvise(fd, offset, length, os.POSIX_FADV_DONTNEED)
|
||||
|
||||
cdef unsigned PAGE_MASK = resource.getpagesize() - 1
|
||||
|
|
Loading…
Reference in a new issue