kern_sendfile.c (160506) | kern_sendfile.c (160619) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/kern/uipc_syscalls.c 160506 2006-07-19 18:28:52Z jhb $"); | 36__FBSDID("$FreeBSD: head/sys/kern/uipc_syscalls.c 160619 2006-07-24 15:20:08Z rwatson $"); |
37 38#include "opt_compat.h" 39#include "opt_ktrace.h" 40#include "opt_mac.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> --- 753 unchanged lines hidden (view full) --- 798 goto bad; 799 } 800 } 801#ifdef KTRACE 802 if (KTRPOINT(td, KTR_GENIO)) 803 ktruio = cloneuio(&auio); 804#endif 805 len = auio.uio_resid; | 37 38#include "opt_compat.h" 39#include "opt_ktrace.h" 40#include "opt_mac.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> --- 753 unchanged lines hidden (view full) --- 798 goto bad; 799 } 800 } 801#ifdef KTRACE 802 if (KTRPOINT(td, KTR_GENIO)) 803 ktruio = cloneuio(&auio); 804#endif 805 len = auio.uio_resid; |
806 error = so->so_proto->pr_usrreqs->pru_sosend(so, mp->msg_name, &auio, 807 0, control, flags, td); | 806 error = sosend(so, mp->msg_name, &auio, 0, control, flags, td); |
808 if (error) { 809 if (auio.uio_resid != len && (error == ERESTART || 810 error == EINTR || error == EWOULDBLOCK)) 811 error = 0; 812 /* Generation of SIGPIPE can be controlled per socket */ 813 if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && 814 !(flags & MSG_NOSIGNAL)) { 815 PROC_LOCK(td->td_proc); --- 199 unchanged lines hidden (view full) --- 1015 return (EINVAL); 1016 } 1017 } 1018#ifdef KTRACE 1019 if (KTRPOINT(td, KTR_GENIO)) 1020 ktruio = cloneuio(&auio); 1021#endif 1022 len = auio.uio_resid; | 807 if (error) { 808 if (auio.uio_resid != len && (error == ERESTART || 809 error == EINTR || error == EWOULDBLOCK)) 810 error = 0; 811 /* Generation of SIGPIPE can be controlled per socket */ 812 if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && 813 !(flags & MSG_NOSIGNAL)) { 814 PROC_LOCK(td->td_proc); --- 199 unchanged lines hidden (view full) --- 1014 return (EINVAL); 1015 } 1016 } 1017#ifdef KTRACE 1018 if (KTRPOINT(td, KTR_GENIO)) 1019 ktruio = cloneuio(&auio); 1020#endif 1021 len = auio.uio_resid; |
1023 error = so->so_proto->pr_usrreqs->pru_soreceive(so, &fromsa, &auio, 1024 (struct mbuf **)0, | 1022 error = soreceive(so, &fromsa, &auio, (struct mbuf **)0, |
1025 (mp->msg_control || controlp) ? &control : (struct mbuf **)0, 1026 &mp->msg_flags); 1027 if (error) { 1028 if (auio.uio_resid != (int)len && (error == ERESTART || 1029 error == EINTR || error == EWOULDBLOCK)) 1030 error = 0; 1031 } 1032#ifdef KTRACE --- 1246 unchanged lines hidden --- | 1023 (mp->msg_control || controlp) ? &control : (struct mbuf **)0, 1024 &mp->msg_flags); 1025 if (error) { 1026 if (auio.uio_resid != (int)len && (error == ERESTART || 1027 error == EINTR || error == EWOULDBLOCK)) 1028 error = 0; 1029 } 1030#ifdef KTRACE --- 1246 unchanged lines hidden --- |