diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-10-06 22:39:26 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-10-06 22:39:26 +0000 |
commit | 44b633232be6963a2c75e1d9716f0037d16c3e1c (patch) | |
tree | 01bc33c8b5d00e096f0cc5ae3358181628fa2306 /sys/kern/kern_exec.c | |
parent | a7af6223a39ac404f0b0fc2508b0edb25083a166 (diff) |
Move out the execution of vmcmds into a separate function.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 7d332543464..dd1daf29d58 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.71 2002/09/23 01:41:09 art Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.72 2002/10/06 22:39:25 art Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -252,7 +252,6 @@ sys_execve(p, v, retval) struct vmspace *vm = p->p_vmspace; char **tmpfap; extern struct emul emul_native; - struct exec_vmcmd *base_vc; /* * Cheap solution to complicated problems. @@ -407,27 +406,7 @@ sys_execve(p, v, retval) if (pack.ep_vmcmds.evs_used == 0) panic("execve: no vmcmds"); #endif - base_vc = NULL; - for (i = 0; i < pack.ep_vmcmds.evs_used && !error; i++) { - struct exec_vmcmd *vcp; - - vcp = &pack.ep_vmcmds.evs_cmds[i]; - - if (vcp->ev_flags & VMCMD_RELATIVE) { -#ifdef DIAGNOSTIC - if (base_vc == NULL) - panic("sys_execve: RELATIVE without base"); -#endif - vcp->ev_addr += base_vc->ev_addr; - } - - error = (*vcp->ev_proc)(p, vcp); - if (vcp->ev_flags & VMCMD_BASE) - base_vc = vcp; - } - - /* free the vmspace-creation commands, and release their references */ - kill_vmcmds(&pack.ep_vmcmds); + error = exec_process_vmcmds(p, &pack); /* if an error happened, deallocate and punt */ if (error) |