logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: 07e96a8fec3f7fe6b8d20d3756bea86fc74e8029
parent 1dbb6e53be5452d9901879d96b611bafabec550f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 27 Sep 2024 12:46:15 +0200

lib/fs: make auto_file_copy fallback to manual on EINVAL

Needed for FreeBSD

Diffstat:

Mlib/fs.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fs.c b/lib/fs.c @@ -84,7 +84,7 @@ auto_file_copy(int fd_in, int fd_out, off_t len, int flags) ret = copy_file_range(fd_in, NULL, fd_out, NULL, len, 0); if(ret < 0) { - if(errno == EXDEV) + if(errno == EXDEV || errno == EINVAL) { errno = 0; return manual_file_copy(fd_in, fd_out, len, flags);