summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_gzip.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-05-02 10:43:17 +0000
committerphk <phk@FreeBSD.org>1996-05-02 10:43:17 +0000
commit779840c457bb3a546512321e6b47d89829e421ca (patch)
treecb8228f2628c3afe7a8e21ed27769c79832dab3b /sys/kern/imgact_gzip.c
parent2476b0058a968684c543c328f819404038e7c419 (diff)
downloadFreeBSD-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_gzip.c')
-rw-r--r--sys/kern/imgact_gzip.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/imgact_gzip.c b/sys/kern/imgact_gzip.c
index 83c1547..5253e68 100644
--- a/sys/kern/imgact_gzip.c
+++ b/sys/kern/imgact_gzip.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: imgact_gzip.c,v 1.20 1996/03/19 15:02:47 bde Exp $
+ * $Id: imgact_gzip.c,v 1.21 1996/05/01 02:42:50 bde Exp $
*
* This module handles execution of a.out files which have been run through
* "gzip". This saves diskspace, but wastes cpu-cycles and VM.
@@ -148,14 +148,14 @@ do_aout_hdr(struct imgact_gzip * gz)
case ZMAGIC:
gz->virtual_offset = 0;
if (gz->a_out.a_text) {
- gz->file_offset = NBPG;
+ gz->file_offset = PAGE_SIZE;
} else {
/* Bill's "screwball mode" */
gz->file_offset = 0;
}
break;
case QMAGIC:
- gz->virtual_offset = NBPG;
+ gz->virtual_offset = PAGE_SIZE;
gz->file_offset = 0;
break;
default:
@@ -163,7 +163,7 @@ do_aout_hdr(struct imgact_gzip * gz)
switch ((int) (ntohl(gz->a_out.a_magic) & 0xffff)) {
case ZMAGIC:
case QMAGIC:
- gz->virtual_offset = NBPG;
+ gz->virtual_offset = PAGE_SIZE;
gz->file_offset = 0;
break;
default:
@@ -172,7 +172,7 @@ do_aout_hdr(struct imgact_gzip * gz)
}
}
- gz->bss_size = roundup(gz->a_out.a_bss, NBPG);
+ gz->bss_size = roundup(gz->a_out.a_bss, PAGE_SIZE);
/*
* Check various fields in header for validity/bounds.
@@ -182,8 +182,7 @@ do_aout_hdr(struct imgact_gzip * gz)
gz->a_out.a_entry >= gz->virtual_offset + gz->a_out.a_text ||
/* text and data size must each be page rounded */
- gz->a_out.a_text % NBPG ||
- gz->a_out.a_data % NBPG) {
+ gz->a_out.a_text & PAGE_MASK || gz->a_out.a_data & PAGE_MASK) {
gz->where = __LINE__;
return (-1);
}
OpenPOWER on IntegriCloud