Module Name:    src
Committed By:   riastradh
Date:           Sun Mar  1 03:19:46 UTC 2020

Modified Files:
        src/sys/dev/dkwedge: dk.c

Log Message:
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!)


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/dkwedge/dk.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/dev/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.98 src/sys/dev/dkwedge/dk.c:1.99
--- src/sys/dev/dkwedge/dk.c:1.98	Fri Feb 28 06:01:23 2020
+++ src/sys/dev/dkwedge/dk.c	Sun Mar  1 03:19:46 2020
@@ -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 @@ dkdump(dev_t dev, daddr_t blkno, void *v
 	/* 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;
 	}

Reply via email to