diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-08-10 18:50:08 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-08-10 18:50:08 +0300 |
commit | 6b72eed3bbe93b16015d38546d82b889edab87bc (patch) | |
tree | 85866ec2f232ffd0f75d939636703657ce4b3f74 | |
parent | f7c3cce332058517b97a632b6581a91fca6550fc (diff) |
Fix file_handle::clone_extents() not correctly detecting old Linux kernels missing syscalls.
-rw-r--r-- | include/llfio/v2.0/detail/impl/posix/file_handle.ipp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llfio/v2.0/detail/impl/posix/file_handle.ipp b/include/llfio/v2.0/detail/impl/posix/file_handle.ipp index 4d431e92..96eb3a40 100644 --- a/include/llfio/v2.0/detail/impl/posix/file_handle.ipp +++ b/include/llfio/v2.0/detail/impl/posix/file_handle.ipp @@ -771,7 +771,7 @@ result<file_handle::extent_pair> file_handle::clone_extents_to(file_handle::exte (void) outoffp; (void) len; (void) flags; - errno = EOPNOTSUPP; + errno = ENOSYS; return -1; #endif }; @@ -797,7 +797,7 @@ result<file_handle::extent_pair> file_handle::clone_extents_to(file_handle::exte off_t off_in = item.src.offset + thisoffset, off_out = item.src.offset + thisoffset + destoffsetdiff; if(_copy_file_range(_v.fd, &off_in, dest.native_handle().fd, &off_out, thisblock, 0) < 0) { - if((EXDEV != errno && EOPNOTSUPP != errno) || !emulate_if_unsupported) + if((EXDEV != errno && EOPNOTSUPP != errno && ENOSYS != errno) || !emulate_if_unsupported) { return posix_error(); } @@ -876,7 +876,7 @@ result<file_handle::extent_pair> file_handle::clone_extents_to(file_handle::exte { if(_zero_file_range(dest.native_handle().fd, item.src.offset + thisoffset + destoffsetdiff, thisblock) < 0) { - if(EOPNOTSUPP != errno || !emulate_if_unsupported) + if((EOPNOTSUPP != errno && ENOSYS != errno) || !emulate_if_unsupported) { return posix_error(); } |