diff options
-rw-r--r-- | sys/arch/amiga/dev/clock.c | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/pmap.c | 4 | ||||
-rw-r--r-- | sys/kern/exec_subr.c | 21 | ||||
-rw-r--r-- | sys/kern/sysv_shm.c | 10 | ||||
-rw-r--r-- | sys/uvm/uvm_device.c | 4 |
5 files changed, 21 insertions, 24 deletions
diff --git a/sys/arch/amiga/dev/clock.c b/sys/arch/amiga/dev/clock.c index 84f01f0e80d..a8d1f5cd47c 100644 --- a/sys/arch/amiga/dev/clock.c +++ b/sys/arch/amiga/dev/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.15 2002/03/14 01:26:28 millert Exp $ */ +/* $OpenBSD: clock.c,v 1.16 2002/11/06 00:17:27 art Exp $ */ /* $NetBSD: clock.c,v 1.25 1997/01/02 20:59:42 is Exp $ */ /* @@ -521,8 +521,8 @@ clockunmmap(dev, addr, p) if (addr == 0) return(EINVAL); /* XXX: how do we deal with this? */ - rv = vm_deallocate(p->p_vmspace->vm_map, (vm_offset_t)addr, PAGE_SIZE); - return(rv == KERN_SUCCESS ? 0 : EINVAL); + uvm_deallocate(p->p_vmspace->vm_map, (vm_offset_t)addr, PAGE_SIZE); + return (0); } startclock() diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index b018c05b6a9..bdc82597402 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.77 2002/10/13 18:26:12 krw Exp $ */ +/* $OpenBSD: pmap.c,v 1.78 2002/11/06 00:17:27 art Exp $ */ /* * Copyright (c) 2001, 2002 Dale Rahn. All rights reserved. @@ -522,7 +522,7 @@ pmap_enter(pm, va, pa, prot, flags) pmap_syncicache_user_virt(pm, va); /* MP - free pmap lock */ - return KERN_SUCCESS; + return 0; } /* diff --git a/sys/kern/exec_subr.c b/sys/kern/exec_subr.c index 0bcd893f109..a4e64f3994a 100644 --- a/sys/kern/exec_subr.c +++ b/sys/kern/exec_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_subr.c,v 1.22 2002/10/07 23:31:42 art Exp $ */ +/* $OpenBSD: exec_subr.c,v 1.23 2002/11/06 00:17:28 art Exp $ */ /* $NetBSD: exec_subr.c,v 1.9 1994/12/04 03:10:42 mycroft Exp $ */ /* @@ -176,7 +176,7 @@ vmcmd_map_pagedvn(p, cmd) * call this routine. */ struct uvm_object *uobj; - int retval; + int error; /* * map the vnode in using uvm_map. @@ -203,7 +203,7 @@ vmcmd_map_pagedvn(p, cmd) * do the map */ - retval = uvm_map(&p->p_vmspace->vm_map, &cmd->ev_addr, cmd->ev_len, + error = uvm_map(&p->p_vmspace->vm_map, &cmd->ev_addr, cmd->ev_len, uobj, cmd->ev_offset, 0, UVM_MAPFLAG(cmd->ev_prot, VM_PROT_ALL, UVM_INH_COPY, UVM_ADV_NORMAL, UVM_FLAG_COPYONW|UVM_FLAG_FIXED)); @@ -212,15 +212,14 @@ vmcmd_map_pagedvn(p, cmd) * check for error */ - if (retval == KERN_SUCCESS) - return(0); - - /* - * error: detach from object - */ + if (error) { + /* + * error: detach from object + */ + uobj->pgops->pgo_detach(uobj); + } - uobj->pgops->pgo_detach(uobj); - return(EINVAL); + return (error); } /* diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 7a0aa69fcf6..4dce0048b20 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_shm.c,v 1.28 2002/10/29 18:30:21 art Exp $ */ +/* $OpenBSD: sysv_shm.c,v 1.29 2002/11/06 00:17:28 art Exp $ */ /* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */ /* @@ -205,7 +205,6 @@ sys_shmat(p, v, retval) vaddr_t attach_va; vm_prot_t prot; vsize_t size; - int rv; shmmap_s = (struct shmmap_state *)p->p_vmspace->vm_shm; if (shmmap_s == NULL) { @@ -250,12 +249,11 @@ sys_shmat(p, v, retval) } shm_handle = shmseg->shm_internal; uao_reference(shm_handle->shm_object); - rv = uvm_map(&p->p_vmspace->vm_map, &attach_va, size, + error = uvm_map(&p->p_vmspace->vm_map, &attach_va, size, shm_handle->shm_object, 0, 0, UVM_MAPFLAG(prot, prot, UVM_INH_SHARE, UVM_ADV_RANDOM, 0)); - if (rv != KERN_SUCCESS) { - return ENOMEM; - } + if (error) + return (error); shmmap_s->va = attach_va; shmmap_s->shmid = SCARG(uap, shmid); diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c index 266e672504f..47a3e232af4 100644 --- a/sys/uvm/uvm_device.c +++ b/sys/uvm/uvm_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_device.c,v 1.22 2002/03/14 01:27:18 millert Exp $ */ +/* $OpenBSD: uvm_device.c,v 1.23 2002/11/06 00:17:28 art Exp $ */ /* $NetBSD: uvm_device.c,v 1.30 2000/11/25 06:27:59 chs Exp $ */ /* @@ -447,7 +447,7 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) " MAPPING: device: pm=0x%x, va=0x%x, pa=0x%lx, at=%d", ufi->orig_map->pmap, curr_va, paddr, mapprot); if (pmap_enter(ufi->orig_map->pmap, curr_va, paddr, - mapprot, PMAP_CANFAIL | mapprot) != KERN_SUCCESS) { + mapprot, PMAP_CANFAIL | mapprot) != 0) { /* * pmap_enter() didn't have the resource to * enter this mapping. Unlock everything, |