mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8293004: (fs) FileChannel.transferXXX use of copy_file_range needs fallback handling for ENOSYS
Reviewed-by: stuefe, alanb, bpb
This commit is contained in:
parent
b3450e930e
commit
343333abcf
@ -190,6 +190,7 @@ Java_sun_nio_ch_FileChannelImpl_transferTo0(JNIEnv *env, jobject this,
|
||||
case EINTR:
|
||||
return IOS_INTERRUPTED;
|
||||
case EINVAL:
|
||||
case ENOSYS:
|
||||
case EXDEV:
|
||||
// ignore and try sendfile()
|
||||
break;
|
||||
@ -307,6 +308,8 @@ Java_sun_nio_ch_FileChannelImpl_transferFrom0(JNIEnv *env, jobject this,
|
||||
if (n < 0) {
|
||||
if (errno == EAGAIN)
|
||||
return IOS_UNAVAILABLE;
|
||||
if (errno == ENOSYS)
|
||||
return IOS_UNSUPPORTED_CASE;
|
||||
if ((errno == EBADF || errno == EINVAL || errno == EXDEV) &&
|
||||
((ssize_t)count >= 0))
|
||||
return IOS_UNSUPPORTED_CASE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user