Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst/arch/i386 Do not ask for a "bios geome...



details:   https://anonhg.NetBSD.org/src/rev/a10fff9eed5f
branches:  trunk
changeset: 754089:a10fff9eed5f
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Apr 19 20:35:23 2010 +0000

description:
Do not ask for a "bios geometry" if we can not match the device to a bios
known device - it's most certainly a don't care.

diffstat:

 distrib/utils/sysinst/arch/i386/md.c |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r ee6cae3a9f20 -r a10fff9eed5f distrib/utils/sysinst/arch/i386/md.c
--- a/distrib/utils/sysinst/arch/i386/md.c      Mon Apr 19 19:22:41 2010 +0000
+++ b/distrib/utils/sysinst/arch/i386/md.c      Mon Apr 19 20:35:23 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.124 2010/01/02 18:06:58 dsl Exp $ */
+/*     $NetBSD: md.c,v 1.125 2010/04/19 20:35:23 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -471,8 +471,10 @@
        }
        if (nip == NULL || nip->ni_nmatches == 0) {
 nogeom:
-               msg_display(MSG_nobiosgeom, dlcyl, dlhead, dlsec);
-               if (guess_biosgeom_from_mbr(&mbr, &cyl, &head, &sec) >= 0)
+               if (nip != NULL)
+                       msg_display(MSG_nobiosgeom, dlcyl, dlhead, dlsec);
+               if (guess_biosgeom_from_mbr(&mbr, &cyl, &head, &sec) >= 0
+                   && nip != NULL)
                        msg_display_add(MSG_biosguess, cyl, head, sec);
                biosdisk = NULL;
        } else {
@@ -507,9 +509,10 @@
                                                        nip->ni_biosmatches[i]];
                }
        }
-       if (biosdisk == NULL)
-               set_bios_geom(cyl, head, sec);
-       else {
+       if (biosdisk == NULL) {
+               if (nip != NULL)
+                       set_bios_geom(cyl, head, sec);
+       } else {
                bcyl = biosdisk->bi_cyl;
                bhead = biosdisk->bi_head;
                bsec = biosdisk->bi_sec;



Home | Main Index | Thread Index | Old Index