Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/distrib/utils/sysinst Pull up following revision(s) (requ...



details:   https://anonhg.NetBSD.org/src/rev/b28cb896220f
branches:  netbsd-3
changeset: 577521:b28cb896220f
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Nov 21 20:40:27 2005 +0000

description:
Pull up following revision(s) (requested by dsl in ticket #975):
        distrib/utils/sysinst/bsddisklabel.c: revision 1.36
Fix check for root being entirely inside the area that can be read on
systems where the bios doesn't support LBA reads.
Due to faked geometries the last few (over 30000!) sectors may not be reported
as being readable, but we expect them to be in swap.  So we don't force a
root+usr install in that case.

diffstat:

 distrib/utils/sysinst/bsddisklabel.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 103a0e78bcd7 -r b28cb896220f distrib/utils/sysinst/bsddisklabel.c
--- a/distrib/utils/sysinst/bsddisklabel.c      Mon Nov 21 20:36:31 2005 +0000
+++ b/distrib/utils/sysinst/bsddisklabel.c      Mon Nov 21 20:40:27 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bsddisklabel.c,v 1.34.2.1 2005/09/18 18:15:38 riz Exp $        */
+/*     $NetBSD: bsddisklabel.c,v 1.34.2.2 2005/11/21 20:40:27 tron Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -397,6 +397,8 @@
                /* Make size of root include default size of /usr */
                pi.ptn_sizes[PI_ROOT].size += pi.ptn_sizes[PI_USR].dflt_size;
 
+               sm = MEG / sectorsize;
+
                if (root_limit != 0) {
                        /* Bah - bios can not read all the disk, limit root */
                        pi.ptn_sizes[PI_ROOT].limit = root_limit - part_start;
@@ -404,7 +406,7 @@
                         * everything except swap.
                         */
                        if (pi.ptn_sizes[PI_ROOT].limit
-                           + pi.ptn_sizes[PI_SWAP].size > sectors) {
+                           < sectors - pi.ptn_sizes[PI_SWAP].size * sm) {
                                /* Root won't be able to access all the space */
                                /* Claw back space for /usr */
                                pi.ptn_sizes[PI_USR].size =
@@ -418,7 +420,6 @@
                }
 
                /* Change preset sizes from MB to sectors */
-               sm = MEG / sectorsize;
                pi.free_space = sectors;
                for (p = pi.ptn_sizes; p->mount[0]; p++) {
                        p->size = NUMSEC(p->size, sm, dlcylsize);



Home | Main Index | Thread Index | Old Index