Module Name:    src
Committed By:   jld
Date:           Sat Mar 13 07:21:38 UTC 2010

Modified Files:
        src/sbin/raidctl: raidctl.c

Log Message:
Exclude parity map regions that don't actually exist from the dirty region count
in `raidctl -m`.  Makes for less confusing output during `raidctl -i`.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sbin/raidctl/raidctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/raidctl/raidctl.c
diff -u src/sbin/raidctl/raidctl.c:1.45 src/sbin/raidctl/raidctl.c:1.46
--- src/sbin/raidctl/raidctl.c:1.45	Wed Jan 27 18:34:02 2010
+++ src/sbin/raidctl/raidctl.c	Sat Mar 13 07:21:37 2010
@@ -1,4 +1,4 @@
-/*      $NetBSD: raidctl.c,v 1.45 2010/01/27 18:34:02 christos Exp $   */
+/*      $NetBSD: raidctl.c,v 1.46 2010/03/13 07:21:37 jld Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.45 2010/01/27 18:34:02 christos Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.46 2010/03/13 07:21:37 jld Exp $");
 #endif
 
 
@@ -504,7 +504,7 @@
 		    st.ctrs.nwrite, st.ctrs.ncachesync, st.ctrs.nclearing);
 
 		dr = 0;
-		for (i = 0; i < RF_PARITYMAP_NREG; i++)
+		for (i = 0; i < st.params.regions; i++)
 			if (isset(st.dirty, i))
 				dr++;
 		printf("raid%d: %d dirty region%s\n", raidID, dr,

Reply via email to