summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_dump.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2005-11-12 20:02:02 +0000
committermarcel <marcel@FreeBSD.org>2005-11-12 20:02:02 +0000
commit8c0ef27b7007299a4be8dc0c5f47a92c27e5d3c7 (patch)
treec384dfdb0cffbbb4d09638a79ee6bec33180fbc4 /sys/geom/geom_dump.c
parentfae8bfd4c4dc2e6c35f726257e68b291f7b9d358 (diff)
downloadFreeBSD-src-8c0ef27b7007299a4be8dc0c5f47a92c27e5d3c7.zip
FreeBSD-src-8c0ef27b7007299a4be8dc0c5f47a92c27e5d3c7.tar.gz
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.
Diffstat (limited to 'sys/geom/geom_dump.c')
-rw-r--r--sys/geom/geom_dump.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c
index fd7001f..1f00db9 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);
}
OpenPOWER on IntegriCloud