diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-05-18 11:56:58 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-05-18 11:56:58 +0000 |
commit | 7c0d93a40b922ef8d4be871014a3a0e6e9aab5b8 (patch) | |
tree | bfb5277a1e5d48c055cc88cf1d8f88dbd8381da9 /sys | |
parent | e98b0cfc0036ca76305a467161b62514314f509c (diff) |
Include msgbuf in /dev/kmem (dmesg)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/pica/pica/mem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/pica/pica/mem.c b/sys/arch/pica/pica/mem.c index 86f22b0b474..6e748f1168c 100644 --- a/sys/arch/pica/pica/mem.c +++ b/sys/arch/pica/pica/mem.c @@ -47,6 +47,7 @@ #include <sys/param.h> #include <sys/conf.h> #include <sys/buf.h> +#include <sys/msgbuf.h> #include <sys/systm.h> #include <sys/uio.h> #include <sys/malloc.h> @@ -117,11 +118,13 @@ mmrw(dev, uio, flags) c = min(iov->iov_len, MAXPHYS); if (v < MACH_CACHED_MEMORY_ADDR) return (EFAULT); - if (v + c > MACH_PHYS_TO_CACHED(avail_end) && + if (v + c > MACH_PHYS_TO_CACHED(avail_end + + sizeof (struct msgbuf)) && (v < MACH_KSEG2_ADDR || !kernacc((caddr_t)v, c, uio->uio_rw == UIO_READ ? B_READ : B_WRITE))) return (EFAULT); + error = uiomove((caddr_t)v, c, uio); continue; |