Date: Tue, 4 Apr 2023 07:40:44 GMT From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 643336549081 - main - If copy_file_range(2) fails with EXDEV, use fall-back. Message-ID: <202304040740.3347eiU8033699@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=64333654908153cd8e2dcb408c57cc3e3c4f29af commit 64333654908153cd8e2dcb408c57cc3e3c4f29af Author: Poul-Henning Kamp <phk@FreeBSD.org> AuthorDate: 2023-04-04 07:39:59 +0000 Commit: Poul-Henning Kamp <phk@FreeBSD.org> CommitDate: 2023-04-04 07:39:59 +0000 If copy_file_range(2) fails with EXDEV, use fall-back. --- bin/cp/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 8c1c350ff6f1..9794152ac724 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304040740.3347eiU8033699>