diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1998-10-15 17:06:36 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1998-10-15 17:06:36 +0000 |
| commit | f03d6f87b33ef0c751f5645013823cf0a6cbad03 (patch) | |
| tree | 2d2fcc66ac588d40a8d0a6e9ec0e6bf51ac2c4c1 | |
| parent | 201fdc5426e79e694c7d5466497f7ffebd21f8fe (diff) | |
Notes
| -rw-r--r-- | sys/boot/alpha/libalpha/bootinfo.c | 10 | ||||
| -rw-r--r-- | sys/boot/i386/libi386/bootinfo.c | 10 | ||||
| -rw-r--r-- | sys/boot/i386/libi386/bootinfo32.c | 10 | ||||
| -rw-r--r-- | sys/boot/i386/libi386/bootinfo64.c | 10 |
4 files changed, 24 insertions, 16 deletions
diff --git a/sys/boot/alpha/libalpha/bootinfo.c b/sys/boot/alpha/libalpha/bootinfo.c index d8a01afbe566..99f213af8fa1 100644 --- a/sys/boot/alpha/libalpha/bootinfo.c +++ b/sys/boot/alpha/libalpha/bootinfo.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bootinfo.c,v 1.12 1998/10/09 23:24:55 peter Exp $ + * $Id: bootinfo.c,v 1.1 1998/10/14 09:53:25 peter Exp $ */ #include <stand.h> @@ -164,9 +164,11 @@ bi_load(struct bootinfo_v1 *bi, vm_offset_t *ffp_save) ssym = esym = 0; /* sanity */ /* find the last module in the chain */ - for (xp = mod_findmodule(NULL, NULL); xp->m_next != NULL; xp = xp->m_next) - ; - addr = xp->m_addr + xp->m_size; + addr = 0; + for (xp = mod_findmodule(NULL, NULL); xp != NULL; xp = xp->m_next) { + if (addr < (xp->m_addr + xp->m_size)) + addr = xp->m_addr + xp->m_size; + } /* pad to a page boundary */ pad = (u_int)addr & PAGE_MASK; if (pad != 0) { diff --git a/sys/boot/i386/libi386/bootinfo.c b/sys/boot/i386/libi386/bootinfo.c index ecd69a22a61a..5b479cd3446e 100644 --- a/sys/boot/i386/libi386/bootinfo.c +++ b/sys/boot/i386/libi386/bootinfo.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bootinfo.c,v 1.12 1998/10/09 23:24:55 peter Exp $ + * $Id: bootinfo.c,v 1.13 1998/10/14 05:07:23 peter Exp $ */ #include <stand.h> @@ -277,9 +277,11 @@ bi_load(char *args, int *howtop, int *bootdevp, vm_offset_t *bip) bi.bi_extmem = getextmem(); /* find the last module in the chain */ - for (xp = mod_findmodule(NULL, NULL); xp->m_next != NULL; xp = xp->m_next) - ; - addr = xp->m_addr + xp->m_size; + addr = 0; + for (xp = mod_findmodule(NULL, NULL); xp != NULL; xp = xp->m_next) { + if (addr < (xp->m_addr + xp->m_size)) + addr = xp->m_addr + xp->m_size; + } /* pad to a page boundary */ pad = (u_int)addr & PAGE_MASK; if (pad != 0) { diff --git a/sys/boot/i386/libi386/bootinfo32.c b/sys/boot/i386/libi386/bootinfo32.c index ecd69a22a61a..5b479cd3446e 100644 --- a/sys/boot/i386/libi386/bootinfo32.c +++ b/sys/boot/i386/libi386/bootinfo32.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bootinfo.c,v 1.12 1998/10/09 23:24:55 peter Exp $ + * $Id: bootinfo.c,v 1.13 1998/10/14 05:07:23 peter Exp $ */ #include <stand.h> @@ -277,9 +277,11 @@ bi_load(char *args, int *howtop, int *bootdevp, vm_offset_t *bip) bi.bi_extmem = getextmem(); /* find the last module in the chain */ - for (xp = mod_findmodule(NULL, NULL); xp->m_next != NULL; xp = xp->m_next) - ; - addr = xp->m_addr + xp->m_size; + addr = 0; + for (xp = mod_findmodule(NULL, NULL); xp != NULL; xp = xp->m_next) { + if (addr < (xp->m_addr + xp->m_size)) + addr = xp->m_addr + xp->m_size; + } /* pad to a page boundary */ pad = (u_int)addr & PAGE_MASK; if (pad != 0) { diff --git a/sys/boot/i386/libi386/bootinfo64.c b/sys/boot/i386/libi386/bootinfo64.c index ecd69a22a61a..5b479cd3446e 100644 --- a/sys/boot/i386/libi386/bootinfo64.c +++ b/sys/boot/i386/libi386/bootinfo64.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bootinfo.c,v 1.12 1998/10/09 23:24:55 peter Exp $ + * $Id: bootinfo.c,v 1.13 1998/10/14 05:07:23 peter Exp $ */ #include <stand.h> @@ -277,9 +277,11 @@ bi_load(char *args, int *howtop, int *bootdevp, vm_offset_t *bip) bi.bi_extmem = getextmem(); /* find the last module in the chain */ - for (xp = mod_findmodule(NULL, NULL); xp->m_next != NULL; xp = xp->m_next) - ; - addr = xp->m_addr + xp->m_size; + addr = 0; + for (xp = mod_findmodule(NULL, NULL); xp != NULL; xp = xp->m_next) { + if (addr < (xp->m_addr + xp->m_size)) + addr = xp->m_addr + xp->m_size; + } /* pad to a page boundary */ pad = (u_int)addr & PAGE_MASK; if (pad != 0) { |
