Date: Wed, 20 May 2020 20:58:18 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361293 - in head/sys: kern sys Message-ID: <202005202058.04KKwIqW077034@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed May 20 20:58:17 2020 New Revision: 361293 URL: https://svnweb.freebsd.org/changeset/base/361293 Log: Remove copyinfrom() and copyinstrfrom(). These functions were added in 2001 and are currently unused. copyinfrom() looks to have never been used. copyinstrfrom() was used for two weeks before the code was refactored to remove it's sole use. Reviewed by: brooks, kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24928 Modified: head/sys/kern/subr_uio.c head/sys/sys/uio.h Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Wed May 20 20:24:37 2020 (r361292) +++ head/sys/kern/subr_uio.c Wed May 20 20:58:17 2020 (r361293) @@ -346,44 +346,6 @@ again: } int -copyinfrom(const void * __restrict src, void * __restrict dst, size_t len, - int seg) -{ - int error = 0; - - switch (seg) { - case UIO_USERSPACE: - error = copyin(src, dst, len); - break; - case UIO_SYSSPACE: - bcopy(src, dst, len); - break; - default: - panic("copyinfrom: bad seg %d\n", seg); - } - return (error); -} - -int -copyinstrfrom(const void * __restrict src, void * __restrict dst, size_t len, - size_t * __restrict copied, int seg) -{ - int error = 0; - - switch (seg) { - case UIO_USERSPACE: - error = copyinstr(src, dst, len, copied); - break; - case UIO_SYSSPACE: - error = copystr(src, dst, len, copied); - break; - default: - panic("copyinstrfrom: bad seg %d\n", seg); - } - return (error); -} - -int copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error) { u_int iovlen; Modified: head/sys/sys/uio.h ============================================================================== --- head/sys/sys/uio.h Wed May 20 20:24:37 2020 (r361292) +++ head/sys/sys/uio.h Wed May 20 20:58:17 2020 (r361293) @@ -80,12 +80,8 @@ struct vm_page; struct bus_dma_segment; struct uio *cloneuio(struct uio *uiop); -int copyinfrom(const void * __restrict src, void * __restrict dst, - size_t len, int seg); int copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error); -int copyinstrfrom(const void * __restrict src, void * __restrict dst, - size_t len, size_t * __restrict copied, int seg); int copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop); int copyout_map(struct thread *td, vm_offset_t *addr, size_t sz); int copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005202058.04KKwIqW077034>