1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

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.
This commit is contained in:
Marcel Moolenaar 2005-11-12 20:02:02 +00:00
parent 6e10a447f8
commit d40f7f8b3e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152342

View File

@ -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);
}