diff options
Diffstat (limited to 'lib/libkvm/kvm_vax.c')
-rw-r--r-- | lib/libkvm/kvm_vax.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libkvm/kvm_vax.c b/lib/libkvm/kvm_vax.c index 5a5fb249aca..643aca422dd 100644 --- a/lib/libkvm/kvm_vax.c +++ b/lib/libkvm/kvm_vax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_vax.c,v 1.13 2006/06/19 20:25:49 miod Exp $ */ +/* $OpenBSD: kvm_vax.c,v 1.14 2013/03/28 16:27:31 deraadt Exp $ */ /* $NetBSD: kvm_vax.c,v 1.3 1996/03/18 22:34:06 thorpej Exp $ */ /*- @@ -109,9 +109,9 @@ _kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) return (0); } - ofs = va & PAGE_MASK; + ofs = va & (kd->nbpg - 1); *pa = ((pte & PG_FRAME) << VAX_PGSHIFT) | ofs; - return (int)(PAGE_SIZE - ofs); + return (int)(kd->nbpg - ofs); } /* |