Introduce the function iovec_copyin() and it's friend iovec_free().
authorDavid P. Reese, Jr. <daver@dragonflybsd.org>
Wed, 8 Oct 2003 01:30:32 +0000 (01:30 +0000)
committerDavid P. Reese, Jr. <daver@dragonflybsd.org>
Wed, 8 Oct 2003 01:30:32 +0000 (01:30 +0000)
commit75a872f8ed371753ba566e42103f22a16b8d4097
treee317cc58ee50c4fdb8f863d79fe90a584d035432
parent27c2f783473045f3d08ad5aedfea12d35ace5d5c
Introduce the function iovec_copyin() and it's friend iovec_free().
These remove a great deal of duplicate code in the syscall functions.
For those who like numbers, this patch uses iovec_copyin() four times
in uipc_syscalls.c, two times in linux_socket.c and two times in
43bsd_socket.c.  Would somebody please comment on the inclusion of
sys/malloc.h in sys/uio.h?

Remove sockargs() which was used once in the svr4 emulation code.  It
is replaced with a small piece of code that gets an mbuf and copyin()'s
to it's data region.

Remove the osendfile() syscall which was inapropriately named and placed
in the COMPAT_43 code where it doesn't belong.

Split the socket(), shutdown() and sendfile() syscalls.  All of the
syscalls in kern/uipc_syscalls.c are now split.

Prevent a panic due to m_freem()'ing a dangling pointer in recvmsg(),
orecvmsg(), linux_recvmsg().

This patch completely removes COMPAT_43 from kern/uipc_syscalls.c.
16 files changed:
sys/emulation/43bsd/43bsd_socket.c
sys/emulation/linux/linux_socket.c
sys/emulation/svr4/svr4_stream.c
sys/kern/init_sysent.c
sys/kern/kern_subr.c
sys/kern/syscalls.c
sys/kern/syscalls.master
sys/kern/uipc_syscalls.c
sys/sys/kern_syscall.h
sys/sys/socketvar.h
sys/sys/syscall-hide.h
sys/sys/syscall.h
sys/sys/syscall.mk
sys/sys/sysproto.h
sys/sys/sysunion.h
sys/sys/uio.h