Module Name:    src
Committed By:   nakayama
Date:           Sun Apr  4 23:38:55 UTC 2010

Modified Files:
        src/sys/arch/sparc64/sparc64: autoconf.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/sys/arch/sparc64/sparc64/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/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.174 src/sys/arch/sparc64/sparc64/autoconf.c:1.175
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.174	Fri Apr  2 18:34:16 2010
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Sun Apr  4 23:38:55 2010
@@ -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)

Reply via email to