diff options
Diffstat (limited to 'sys/powerpc/powerpc/uio_machdep.c')
-rw-r--r-- | sys/powerpc/powerpc/uio_machdep.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/powerpc/powerpc/uio_machdep.c b/sys/powerpc/powerpc/uio_machdep.c index ee0f9f2a0795..63911963279a 100644 --- a/sys/powerpc/powerpc/uio_machdep.c +++ b/sys/powerpc/powerpc/uio_machdep.c @@ -100,20 +100,28 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) switch (uio->uio_segflg) { case UIO_USERSPACE: maybe_yield(); - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: error = copyout(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: error = copyin(iov->iov_base, cp, cnt); + break; + } if (error) { sf_buf_free(sf); goto out; } break; case UIO_SYSSPACE: - if (uio->uio_rw == UIO_READ) + switch (uio->uio_rw) { + case UIO_READ: bcopy(cp, iov->iov_base, cnt); - else + break; + case UIO_WRITE: bcopy(iov->iov_base, cp, cnt); + break; + } break; case UIO_NOCOPY: break; |