diff options
author | phk <phk@FreeBSD.org> | 1996-05-02 10:43:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-05-02 10:43:17 +0000 |
commit | 779840c457bb3a546512321e6b47d89829e421ca (patch) | |
tree | cb8228f2628c3afe7a8e21ed27769c79832dab3b /sys/kern/imgact_aout.c | |
parent | 2476b0058a968684c543c328f819404038e7c419 (diff) | |
download | FreeBSD-src-779840c457bb3a546512321e6b47d89829e421ca.zip FreeBSD-src-779840c457bb3a546512321e6b47d89829e421ca.tar.gz |
First pass at cleaning up macros relating to pages, clusters and all that.
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r-- | sys/kern/imgact_aout.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 9174d32..0455da5 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: imgact_aout.c,v 1.26 1996/04/08 01:21:57 davidg Exp $ + * $Id: imgact_aout.c,v 1.27 1996/05/01 02:42:41 bde Exp $ */ #include <sys/param.h> @@ -80,14 +80,14 @@ exec_aout_imgact(imgp) case ZMAGIC: virtual_offset = 0; if (a_out->a_text) { - file_offset = NBPG; + file_offset = PAGE_SIZE; } else { /* Bill's "screwball mode" */ file_offset = 0; } break; case QMAGIC: - virtual_offset = NBPG; + virtual_offset = PAGE_SIZE; file_offset = 0; break; default: @@ -95,7 +95,7 @@ exec_aout_imgact(imgp) switch ((int)(ntohl(a_out->a_magic) & 0xffff)) { case ZMAGIC: case QMAGIC: - virtual_offset = NBPG; + virtual_offset = PAGE_SIZE; file_offset = 0; break; default: @@ -103,7 +103,7 @@ exec_aout_imgact(imgp) } } - bss_size = roundup(a_out->a_bss, NBPG); + bss_size = roundup(a_out->a_bss, PAGE_SIZE); /* * Check various fields in header for validity/bounds. @@ -113,8 +113,7 @@ exec_aout_imgact(imgp) a_out->a_entry >= virtual_offset + a_out->a_text || /* text and data size must each be page rounded */ - a_out->a_text % NBPG || - a_out->a_data % NBPG) + a_out->a_text & PAGE_MASK || a_out->a_data & PAGE_MASK) return (-1); /* text + data can't exceed file size */ |