Module Name:    src
Committed By:   snj
Date:           Thu Nov  7 20:35:16 UTC 2013

Modified Files:
        src/sys/arch/x86/x86 [netbsd-6]: x86_autoconf.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #977):
        sys/arch/x86/x86/x86_autoconf.c: revision 1.67
If we have both wedge and partition info, use the partition info in the
wedge case too. From mlelstv.
XXX: pullup-6


To generate a diff of this commit:
cvs rdiff -u -r1.62.8.3 -r1.62.8.4 src/sys/arch/x86/x86/x86_autoconf.c

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

Modified files:

Index: src/sys/arch/x86/x86/x86_autoconf.c
diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.62.8.3 src/sys/arch/x86/x86/x86_autoconf.c:1.62.8.4
--- src/sys/arch/x86/x86/x86_autoconf.c:1.62.8.3	Wed Aug  8 15:51:08 2012
+++ src/sys/arch/x86/x86/x86_autoconf.c	Thu Nov  7 20:35:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_autoconf.c,v 1.62.8.3 2012/08/08 15:51:08 martin Exp $	*/
+/*	$NetBSD: x86_autoconf.c,v 1.62.8.4 2013/11/07 20:35:16 snj Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.62.8.3 2012/08/08 15:51:08 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.62.8.4 2013/11/07 20:35:16 snj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -346,7 +346,10 @@ findroot(void)
 			return;
 	}
 
-	if ((biw = lookup_bootinfo(BTINFO_BOOTWEDGE)) != NULL) {
+	bid = lookup_bootinfo(BTINFO_BOOTDISK);
+	biw = lookup_bootinfo(BTINFO_BOOTWEDGE);
+
+	if (biw != NULL) {
 		/*
 		 * Scan all disk devices for ones that match the passed data.
 		 * Don't break if one is found, to get possible multiple
@@ -382,7 +385,7 @@ findroot(void)
 				continue;
 			}
 			booted_device = dv;
-			booted_partition = 0;
+			booted_partition = bid != NULL ? bid->partition : 0;
 			booted_nblks = biw->nblks;
 			booted_startblk = biw->startblk;
 		}
@@ -392,7 +395,7 @@ findroot(void)
 			return;
 	}
 
-	if ((bid = lookup_bootinfo(BTINFO_BOOTDISK)) != NULL) {
+	if (bid != NULL) {
 		/*
 		 * Scan all disk devices for ones that match the passed data.
 		 * Don't break if one is found, to get possible multiple

Reply via email to