aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2005-11-12 20:02:02 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2005-11-12 20:02:02 +0000
commitd40f7f8b3e3af7597e1caf4979ac067e971a89b8 (patch)
treec384dfdb0cffbbb4d09638a79ee6bec33180fbc4
parent6e10a447f8aea9fe3d893c5da92f415c943fc50d (diff)
downloadsrc-d40f7f8b3e3af7597e1caf4979ac067e971a89b8.tar.gz
src-d40f7f8b3e3af7597e1caf4979ac067e971a89b8.zip
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.
Notes
Notes: svn path=/head/; revision=152342
-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 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);
}