From d40f7f8b3e3af7597e1caf4979ac067e971a89b8 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 12 Nov 2005 20:02:02 +0000 Subject: [PATCH] Make the kern.geom.conftxt sysctl more usable by also dumping the MD class. Previously only the DISK class was dumped. The only consumer of this sysctl is libdisk (i.e. sysinstall) and it tests explicitly for instances of the DISK class. Dumping other classes is therefore harmless. By also dumping the MD class regression tests can be written that use the MD class for operations that would normally be done on the DISK class. The sysctl can now be used to test if those operations took an effect. An example is partitioning. --- sys/geom/geom_dump.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c index fd7001f65787..1f00db9de171 100644 --- a/sys/geom/geom_dump.c +++ b/sys/geom/geom_dump.c @@ -145,11 +145,10 @@ g_conftxt(void *p, int flag) KASSERT(flag != EV_CANCEL, ("g_conftxt was cancelled")); sb = p; g_topology_assert(); - LIST_FOREACH(mp, &g_classes, class) - if (!strcmp(mp->name, "DISK")) - break; - if (mp != NULL) - g_conftxt_class(sb, mp); + LIST_FOREACH(mp, &g_classes, class) { + if (!strcmp(mp->name, "DISK") || !strcmp(mp->name, "MD")) + g_conftxt_class(sb, mp); + } sbuf_finish(sb); }