Date: Sat, 23 Oct 2021 08:27:00 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 2c7f79828254 - main - linux: Fix ENOTSOCK handling in sendfile(2) Message-ID: <202110230827.19N8R0iO023387@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=2c7f7982825442c851e8bb17555a086a232ef4d9 commit 2c7f7982825442c851e8bb17555a086a232ef4d9 Author: Edward Tomasz Napierala <trasz@FreeBSD.org> AuthorDate: 2021-10-23 08:15:37 +0000 Commit: Edward Tomasz Napierala <trasz@FreeBSD.org> CommitDate: 2021-10-23 08:15:58 +0000 linux: Fix ENOTSOCK handling in sendfile(2) The Linux way for sendfile(2) to tell the application to fallback to another way of copying data is by EINVAL, not ENOTSOCK. This fixes package installation scripts for Mono packages from Focal. Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32604 --- sys/compat/linux/linux_socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 9ae44b909d80..a2b45edf7bdc 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2101,6 +2101,8 @@ linux_sendfile_common(struct thread *td, l_int out, l_int in, td->td_retval[0] = (ssize_t)bytes_read; drop: fdrop(fp, td); + if (error == ENOTSOCK) + error = EINVAL; return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110230827.19N8R0iO023387>