Module Name:    src
Committed By:   martin
Date:           Mon Apr 19 20:35:24 UTC 2010

Modified Files:
        src/distrib/utils/sysinst/arch/i386: md.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/distrib/utils/sysinst/arch/i386/md.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/sysinst/arch/i386/md.c
diff -u src/distrib/utils/sysinst/arch/i386/md.c:1.124 src/distrib/utils/sysinst/arch/i386/md.c:1.125
--- src/distrib/utils/sysinst/arch/i386/md.c:1.124	Sat Jan  2 18:06:58 2010
+++ src/distrib/utils/sysinst/arch/i386/md.c	Mon Apr 19 20:35:23 2010
@@ -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;

Reply via email to