summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2009-07-31 15:30:36 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2009-07-31 15:30:36 +0000
commit781b950ecf0f996c9426c803739d7f446c890c8c (patch)
tree6179f0a92437a64fb35e625f08368cf69f0ca79e /sys
parent5571d058b348039e9a4c920e93847ea19c2a4573 (diff)
Clean up debug droppings.
ok marco@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid_raidp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c
index 91174b64810..1a23669a4c9 100644
--- a/sys/dev/softraid_raidp.c
+++ b/sys/dev/softraid_raidp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raidp.c,v 1.7 2009/07/31 15:23:02 jsing Exp $ */
+/* $OpenBSD: softraid_raidp.c,v 1.8 2009/07/31 15:30:35 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -251,14 +251,18 @@ sr_raidp_set_vol_state(struct sr_discipline *sd)
else if (states[BIOC_SDREBUILD] != 0)
new_state = BIOC_SVREBUILD;
else {
- printf("old_state = %d, ", old_state);
+#ifdef SR_DEBUG
+ DNPRINTF(SR_D_STATE, "%s: invalid volume state, old state "
+ "was %d\n", DEVNAME(sd->sd_sc), old_state);
for (i = 0; i < nd; i++)
- printf("%d = %d, ", i,
+ DNPRINTF(SR_D_STATE, "%s: chunk %d status = %d\n",
+ DEVNAME(sd->sd_sc), i,
sd->sd_vol.sv_chunks[i]->src_meta.scm_status);
- panic("invalid new_state");
+#endif
+ panic("invalid volume state");
}
- DNPRINTF(SR_D_STATE, "%s: %s: sr_raid_set_vol_state %d -> %d\n",
+ DNPRINTF(SR_D_STATE, "%s: %s: sr_raidp_set_vol_state %d -> %d\n",
DEVNAME(sd->sd_sc), sd->sd_meta->ssd_devname,
old_state, new_state);