summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_subr.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 8b5e31397a7..6e9edbb950a 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_subr.c,v 1.7 1999/02/26 03:16:47 millert Exp $ */
+/* $OpenBSD: kern_subr.c,v 1.8 1999/02/26 04:56:02 art Exp $ */
/* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */
/*
@@ -85,11 +85,20 @@ uiomove(cp, n, uio)
break;
case UIO_SYSSPACE:
+#if defined(UVM)
+ if (uio->uio_rw == UIO_READ)
+ error = kcopy(cp, iov->iov_base, cnt);
+ else
+ error = kcopy(iov->iov_base, cp, cnt);
+ if (error)
+ return(error);
+#else
if (uio->uio_rw == UIO_READ)
bcopy((caddr_t)cp, iov->iov_base, cnt);
else
bcopy(iov->iov_base, (caddr_t)cp, cnt);
break;
+#endif
}
iov->iov_base += cnt;
iov->iov_len -= cnt;