Module Name:    src
Committed By:   martin
Date:           Sat Oct 13 17:14:13 UTC 2018

Modified Files:
        src/sys/kern [netbsd-8]: kern_subr.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1056):

        sys/kern/kern_subr.c: revision 1.220

Set rootdev for wedges.


To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.217.10.1 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.217 src/sys/kern/kern_subr.c:1.217.10.1
--- src/sys/kern/kern_subr.c:1.217	Thu May 12 02:24:16 2016
+++ src/sys/kern/kern_subr.c	Sat Oct 13 17:14:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_subr.c,v 1.217 2016/05/12 02:24:16 ozaki-r Exp $	*/
+/*	$NetBSD: kern_subr.c,v 1.217.10.1 2018/10/13 17:14:13 martin 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.217 2016/05/12 02:24:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.217.10.1 2018/10/13 17:14:13 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -430,11 +430,13 @@ setroot(device_t bootdv, int bootpartiti
 			goto haveroot;
 		}
 
-		if (rootdev == NODEV &&
-		    dv != NULL && device_class(dv) == DV_DISK &&
-		    device_is_a(dv, "dk") &&
-		    (majdev = devsw_name2blk(device_xname(dv), NULL, 0)) >= 0)
+		if (dv != NULL && device_class(dv) == DV_DISK &&
+		    !DEV_USES_PARTITIONS(dv) &&
+		    (majdev = devsw_name2blk(device_xname(dv), NULL, 0)) >= 0) {
+			rootdv = dv;
 			rootdev = makedev(majdev, device_unit(dv));
+			goto haveroot;
+		}
 
 		rootdevname = devsw_blk2name(major(rootdev));
 		if (rootdevname == NULL) {

Reply via email to