diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-09-14 14:19:57 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-09-14 14:19:57 +0000 |
commit | 77d8dc8883c5762fdca86d89abafc3576c340357 (patch) | |
tree | 79c996c842932cf3b50951943063deb3eda2eaa5 | |
parent | 7086254ee7e492afc84aaef072cde82dee778b5d (diff) |
vaddr_t/vsize_t
-rw-r--r-- | sys/dev/ksyms.c | 16 | ||||
-rw-r--r-- | sys/dev/ramdisk.c | 13 |
2 files changed, 13 insertions, 16 deletions
diff --git a/sys/dev/ksyms.c b/sys/dev/ksyms.c index f9e3fcaf4a5..94193940557 100644 --- a/sys/dev/ksyms.c +++ b/sys/dev/ksyms.c @@ -118,7 +118,7 @@ ksymsread(dev, uio, flags) struct uio *uio; int flags; { - register vm_offset_t v; + register vaddr_t v; register size_t c, len; int error = 0; @@ -133,8 +133,7 @@ ksymsread(dev, uio, flags) } /* Can't read past size of symbol table... */ - if (uio->uio_offset >= (vm_offset_t)(esym - symtab) + - k1->a_text) + if (uio->uio_offset >= (vaddr_t)(esym - symtab) + k1->a_text) break; if (uio->uio_offset < k1->a_text) { @@ -150,18 +149,17 @@ ksymsread(dev, uio, flags) len = iov->iov_len; /* Make offset relative to struct exec */ - v = uio->uio_offset + (vm_offset_t)k1; + v = uio->uio_offset + (vaddr_t)k1; c = min(len, MAXPHYS); error = uiomove((caddr_t)v, c, uio); } else { /* Make offset relative to symtab */ - v = uio->uio_offset - k1->a_text + - (vm_offset_t)symtab; + v = uio->uio_offset - k1->a_text + (vaddr_t)symtab; c = min(iov->iov_len, MAXPHYS); /* Don't read past esym, truncate. */ - if (v + c > (vm_offset_t)esym) - c = (vm_offset_t)esym - v; + if (v + c > (vaddr_t)esym) + c = (vaddr_t)esym - v; error = uiomove((caddr_t)v, c, uio); } } @@ -175,7 +173,7 @@ ksymsmmap(dev, off, prot) dev_t dev; int off, prot; { -#define ksyms_btop(x) ((vm_offset_t)(x) >> PGSHIFT +#define ksyms_btop(x) ((vaddr_t)(x) >> PGSHIFT if (off < 0) return (-1); if ((unsigned)off >= (unsigned)(esym - symtab) + k1->a_text) diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index d89c520aa69..49f264c8b97 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.9 1999/02/26 01:44:33 art Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.10 1999/09/14 14:19:56 mickey Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -544,8 +544,8 @@ rd_ioctl_kalloc(sc, urd, proc) struct rd_conf *urd; struct proc *proc; { - vm_offset_t addr; - vm_size_t size; + vaddr_t addr; + vsize_t size; /* Sanity check the size. */ size = urd->rd_size; @@ -576,14 +576,13 @@ rd_ioctl_server(sc, urd, proc) struct rd_conf *urd; struct proc *proc; { - vm_offset_t end; + vaddr_t end; int error; /* Sanity check addr, size. */ - end = (vm_offset_t) (urd->rd_addr + urd->rd_size); + end = (vaddr_t) (urd->rd_addr + urd->rd_size); - if ((end >= VM_MAXUSER_ADDRESS) || - (end < ((vm_offset_t) urd->rd_addr)) ) + if ((end >= VM_MAXUSER_ADDRESS) || (end < ((vaddr_t) urd->rd_addr)) ) return EINVAL; /* This unit is now configured. */ |