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
This commit is contained in:
John Baldwin 2020-05-20 20:58:17 +00:00
parent 0a3ed02ab8
commit 6faabe5411
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361293
2 changed files with 0 additions and 42 deletions

View File

@ -345,44 +345,6 @@ ureadc(int c, struct uio *uio)
return (0);
}
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)
{

View File

@ -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);