diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-11-26 16:44:29 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-11-26 16:44:29 +0000 |
commit | 620fb93fc2e3dd44434ddb15020003a5788004ee (patch) | |
tree | 08795df9ee1e1c6243eb79dffe01777ec1048509 /sys/compat/common/compat_exec.c | |
parent | b668373c60a85bce316a1db3a382711a1ea964ed (diff) |
Use round_page(X) instead of roundup(X, NBPG), use PAGE_SIZE instead of NBPG.
Diffstat (limited to 'sys/compat/common/compat_exec.c')
-rw-r--r-- | sys/compat/common/compat_exec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/common/compat_exec.c b/sys/compat/common/compat_exec.c index d51393454f5..0f938a21507 100644 --- a/sys/compat/common/compat_exec.c +++ b/sys/compat/common/compat_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat_exec.c,v 1.4 1999/01/11 05:12:11 millert Exp $ */ +/* $OpenBSD: compat_exec.c,v 1.5 1999/11/26 16:44:27 art Exp $ */ /* $NetBSD: compat_exec.c,v 1.1 1996/05/18 15:52:21 christos Exp $ */ /* @@ -79,13 +79,13 @@ exec_aout_prep_oldzmagic(p, epp) /* set up command for text segment */ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, execp->a_text, - epp->ep_taddr, epp->ep_vp, NBPG, /* XXX should NBPG be CLBYTES? */ + epp->ep_taddr, epp->ep_vp, PAGE_SIZE, VM_PROT_READ|VM_PROT_EXECUTE); /* set up command for data segment */ NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, execp->a_data, epp->ep_daddr, epp->ep_vp, - execp->a_text + NBPG, /* XXX should NBPG be CLBYTES? */ + execp->a_text + PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); /* set up command for bss segment */ @@ -131,7 +131,7 @@ exec_aout_prep_oldnmagic(p, epp) VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); /* set up command for bss segment */ - baddr = roundup(epp->ep_daddr + execp->a_data, NBPG); + baddr = round_page(epp->ep_daddr + execp->a_data); bsize = epp->ep_daddr + epp->ep_dsize - baddr; if (bsize > 0) NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr, @@ -170,7 +170,7 @@ exec_aout_prep_oldomagic(p, epp) sizeof(struct exec), VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); /* set up command for bss segment */ - baddr = roundup(epp->ep_daddr + execp->a_data, NBPG); + baddr = round_page(epp->ep_daddr + execp->a_data); bsize = epp->ep_daddr + epp->ep_dsize - baddr; if (bsize > 0) NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr, @@ -184,7 +184,7 @@ exec_aout_prep_oldomagic(p, epp) * Compensate `ep_dsize' for the amount of data covered by the last * text page. */ - dsize = epp->ep_dsize + execp->a_text - roundup(execp->a_text, NBPG); + dsize = epp->ep_dsize + execp->a_text - round_page(execp->a_text); epp->ep_dsize = (dsize > 0) ? dsize : 0; return exec_setup_stack(p, epp); } |