- if (uio->uio_rw == UIO_READ)
- {
- KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_START,
- (int)cp, (int)uio->uio_iovs.iov64p->iov_base, acnt, 1,0);
-
- error = copypv((addr64_t)cp, uio->uio_iovs.iov64p->iov_base, acnt, cppvPsrc | cppvNoRefSrc);
- if (error) /* Copy physical to virtual */
- error = EFAULT;
-
- KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_END,
- (int)cp, (int)uio->uio_iovs.iov64p->iov_base, acnt, 1,0);
- }
- else
- {
- KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_START,
- (int)uio->uio_iovs.iov64p->iov_base, (int)cp, acnt, 1,0);
-
- error = copypv(uio->uio_iovs.iov64p->iov_base, (addr64_t)cp, acnt, cppvPsnk | cppvNoRefSrc | cppvNoModSnk);
- if (error) /* Copy virtual to physical */
- error = EFAULT;
-
- KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_END,
- (int)uio->uio_iovs.iov64p->iov_base, (int)cp, acnt, 1,0);
- }
- if (error)
- return (error);
- break;
-