Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/kern Pull up following revision(s) (requested by mlel...



details:   https://anonhg.NetBSD.org/src/rev/c249223e4962
branches:  netbsd-8
changeset: 435305:c249223e4962
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Oct 13 17:14:13 2018 +0000

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

        sys/kern/kern_subr.c: revision 1.220

Set rootdev for wedges.

diffstat:

 sys/kern/kern_subr.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r 8de20fa907d9 -r c249223e4962 sys/kern/kern_subr.c
--- a/sys/kern/kern_subr.c      Sat Oct 13 17:09:41 2018 +0000
+++ b/sys/kern/kern_subr.c      Sat Oct 13 17:14:13 2018 +0000
@@ -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 @@
                        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) {



Home | Main Index | Thread Index | Old Index