From: Nick Rosbrook Date: Thu, 18 Apr 2024 16:01:42 +0000 (-0400) Subject: copy: ignore -EOPNOTSUPP from copy_file_range() X-Git-Tag: v256-rc1~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0bc1e897178da521e74acb270843805f5906adf;p=thirdparty%2Fsystemd.git copy: ignore -EOPNOTSUPP from copy_file_range() According to copy_file_range (2), errno will be set to EOPNOTSUPP when the file system does not support copy_file_range(). Since there is already fallback logic in place here for other kinds of errors, add -EOPNOTSUPP to the list of ignored errors. --- diff --git a/src/shared/copy.c b/src/shared/copy.c index 2374fa3b62f..8389774db75 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -335,7 +335,7 @@ int copy_bytes_full( if (try_cfr) { n = try_copy_file_range(fdf, NULL, fdt, NULL, m, 0u); if (n < 0) { - if (!IN_SET(n, -EINVAL, -ENOSYS, -EXDEV, -EBADF)) + if (!IN_SET(n, -EINVAL, -ENOSYS, -EXDEV, -EBADF, -EOPNOTSUPP)) return n; try_cfr = false;