Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Avoid use of LOOKUP_BOOTINFO, since...



details:   https://anonhg.NetBSD.org/src/rev/c0af5ee9d1f3
branches:  trunk
changeset: 753631:c0af5ee9d1f3
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Sun Apr 04 23:38:55 2010 +0000

description:
Avoid use of LOOKUP_BOOTINFO, since LOOKUP_BOOTINFO causes panic
when BTINFO_XXX is not passed from ofwboot.

This makes -current kernel bootable with old ofwboot.

diffstat:

 sys/arch/sparc64/sparc64/autoconf.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 02753f03c8d1 -r c0af5ee9d1f3 sys/arch/sparc64/sparc64/autoconf.c
--- a/sys/arch/sparc64/sparc64/autoconf.c       Sun Apr 04 23:02:23 2010 +0000
+++ b/sys/arch/sparc64/sparc64/autoconf.c       Sun Apr 04 23:38:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.174 2010/04/02 18:34:16 martin Exp $ */
+/*     $NetBSD: autoconf.c,v 1.175 2010/04/04 23:38:55 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.174 2010/04/02 18:34:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.175 2010/04/04 23:38:55 nakayama Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -356,8 +356,8 @@
        if ((chosen = OF_finddevice("/chosen")) == -1)
                return;
 
-       LOOKUP_BOOTINFO(bdev, BTINFO_BOOTDEV);
-       if (bdev) {
+       bdev = lookup_bootinfo(BTINFO_BOOTDEV);
+       if (bdev != NULL) {
                strcpy(ofbootpath, bdev->name);
        } else {
                if (OF_getprop(chosen, "bootpath", sbuf, sizeof(sbuf)) < 0)



Home | Main Index | Thread Index | Old Index