Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/dkwedge Allow dumping to cgd(4) on a dk(4).



details:   https://anonhg.NetBSD.org/src/rev/794af28fd49f
branches:  trunk
changeset: 969767:794af28fd49f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Mar 01 03:19:46 2020 +0000

description:
Allow dumping to cgd(4) on a dk(4).

(Technically this also allows dumping to a dk(4) on which there
happens to be a cgd(4) configured, but I'm not sure how to
distinguish that case here.  So don't do that!)

diffstat:

 sys/dev/dkwedge/dk.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r d88ee7ebc05c -r 794af28fd49f sys/dev/dkwedge/dk.c
--- a/sys/dev/dkwedge/dk.c      Sun Mar 01 03:06:08 2020 +0000
+++ b/sys/dev/dkwedge/dk.c      Sun Mar 01 03:19:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dk.c,v 1.98 2020/02/28 06:01:23 yamaguchi Exp $        */
+/*     $NetBSD: dk.c,v 1.99 2020/03/01 03:19:46 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.98 2020/02/28 06:01:23 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.99 2020/03/01 03:19:46 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dkwedge.h"
@@ -1607,7 +1607,8 @@
        /* Our content type is static, no need to open the device. */
 
        if (strcmp(sc->sc_ptype, DKW_PTYPE_SWAP) != 0 &&
-           strcmp(sc->sc_ptype, DKW_PTYPE_RAID) != 0) {
+           strcmp(sc->sc_ptype, DKW_PTYPE_RAID) != 0 &&
+           strcmp(sc->sc_ptype, DKW_PTYPE_CGD) != 0) {
                rv = ENXIO;
                goto out;
        }



Home | Main Index | Thread Index | Old Index