Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 If we have both wedge and partition info, u...



details:   https://anonhg.NetBSD.org/src/rev/c2518b694559
branches:  trunk
changeset: 786442:c2518b694559
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 28 14:32:55 2013 +0000

description:
If we have both wedge and partition info, use the partition info in the
wedge case too. From mlelstv.
XXX: pullup-6

diffstat:

 sys/arch/x86/x86/x86_autoconf.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 6d87ca8adf11 -r c2518b694559 sys/arch/x86/x86/x86_autoconf.c
--- a/sys/arch/x86/x86/x86_autoconf.c   Sun Apr 28 14:11:43 2013 +0000
+++ b/sys/arch/x86/x86/x86_autoconf.c   Sun Apr 28 14:32:55 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86_autoconf.c,v 1.66 2012/12/29 21:57:13 christos Exp $       */
+/*     $NetBSD: x86_autoconf.c,v 1.67 2013/04/28 14:32:55 christos 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.66 2012/12/29 21:57:13 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.67 2013/04/28 14:32:55 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -346,7 +346,10 @@
                        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 @@
                                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 @@
                        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



Home | Main Index | Thread Index | Old Index