Module Name:    src
Committed By:   cliff
Date:           Tue Jun  8 18:29:11 UTC 2010

Modified Files:
        src/sys/kern [matt-nb5-mips64]: kern_subr.c

Log Message:
pulled fix from -current (1.207) back to setroot():
when there is a rootspec, but it's a disk, don't say it's "not configured"
just on the basis of finddevice() returning NULL -- that will always happen
when e.g. rootspec is "sd0a" and the device xname is "sd0".


To generate a diff of this commit:
cvs rdiff -u -r1.192.4.1.4.2 -r1.192.4.1.4.3 src/sys/kern/kern_subr.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/kern/kern_subr.c
diff -u src/sys/kern/kern_subr.c:1.192.4.1.4.2 src/sys/kern/kern_subr.c:1.192.4.1.4.3
--- src/sys/kern/kern_subr.c:1.192.4.1.4.2	Tue Jan 26 04:51:03 2010
+++ src/sys/kern/kern_subr.c	Tue Jun  8 18:29:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_subr.c,v 1.192.4.1.4.2 2010/01/26 04:51:03 cliff Exp $	*/
+/*	$NetBSD: kern_subr.c,v 1.192.4.1.4.3 2010/06/08 18:29:11 cliff Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.192.4.1.4.2 2010/01/26 04:51:03 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.192.4.1.4.3 2010/06/08 18:29:11 cliff Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -974,20 +974,11 @@
 		 */
 
 		/*
-		 * if rootspec is not configured, ask (again)
-		 */
-		dv = finddevice(rootspec);
-		if (dv == NULL) {
-			printf("device %s not configured\n", rootspec);
-			boothowto |= RB_ASKNAME;
-			goto top;
-		}
-
-		/*
 		 * If it's a network interface, we can bail out
 		 * early.
 		 */
-		if (device_class(dv) == DV_IFNET) {
+		dv = finddevice(rootspec);
+		if (dv != NULL && device_class(dv) == DV_IFNET) {
 			rootdv = dv;
 			goto haveroot;
 		}

Reply via email to