summaryrefslogtreecommitdiffstats
path: root/sys/geom/part/g_part.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-04-23 20:13:05 +0000
committermarcel <marcel@FreeBSD.org>2008-04-23 20:13:05 +0000
commit38e8adf72053670c84a15fd57d641357ec1d4501 (patch)
tree0e7bf464079f7c3553cf6f191b95c9772ae66018 /sys/geom/part/g_part.c
parentf7fcfdc595633492f520f12db8f7447003ab54b3 (diff)
downloadFreeBSD-src-38e8adf72053670c84a15fd57d641357ec1d4501.zip
FreeBSD-src-38e8adf72053670c84a15fd57d641357ec1d4501.tar.gz
Implement the G_PART_DUMPCONF method for all 6 schemes. Also call
the method for the (indent == NULL) case (i.e. the kern.geom.conftxt sysctl). The purpose is to extend the conftxt output with scheme- specific fields which can be used by libdisk. In particular, have the schemes dump the xs and xt fields, which contain the backward compatible values for class type and partition type. This allows libdisk to work with the legacy slicers as well as with gpart and helps/promotes migration.
Diffstat (limited to 'sys/geom/part/g_part.c')
-rw-r--r--sys/geom/part/g_part.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index f05d750..68b2515 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -1489,6 +1489,13 @@ g_part_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
sbuf_printf(sb, " i %u o %ju ty %s", entry->gpe_index,
(uintmax_t)entry->gpe_offset,
G_PART_TYPE(table, entry, buf, sizeof(buf)));
+ /*
+ * libdisk compatibility quirk - the scheme dumps the
+ * slicer name and partition type in a way that is
+ * compatible with libdisk. When libdisk is not used
+ * anymore, this should go away.
+ */
+ G_PART_DUMPCONF(table, entry, sb, indent);
} else if (cp != NULL) { /* Consumer configuration. */
KASSERT(pp == NULL, (__func__));
/* none */
OpenPOWER on IntegriCloud