If copy_file_range(2) fails with EXDEV, use fall-back.
This commit is contained in:
parent
396b6914c9
commit
6433365490
@ -180,7 +180,7 @@ copy_file(const FTSENT *entp, int dne)
|
||||
if (use_copy_file_range) {
|
||||
wcount = copy_file_range(from_fd, NULL,
|
||||
to_fd, NULL, SSIZE_MAX, 0);
|
||||
if (wcount < 0 && errno == EINVAL) {
|
||||
if (wcount < 0 && (errno == EINVAL || errno == EXDEV)) {
|
||||
/* Prob a non-seekable FD */
|
||||
use_copy_file_range = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user