summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2009-02-08 20:15:08 +0000
committermarcel <marcel@FreeBSD.org>2009-02-08 20:15:08 +0000
commitf3c03c908a7f4a89d8bac3429aa4e29e36d4d43d (patch)
tree09c7c1aeb003b4b56ada47a8874001e3aaa52f4b
parent9e30deb858aeee0d99b9519fa245e41e2bca3acb (diff)
downloadFreeBSD-src-f3c03c908a7f4a89d8bac3429aa4e29e36d4d43d.zip
FreeBSD-src-f3c03c908a7f4a89d8bac3429aa4e29e36d4d43d.tar.gz
o Add the "PART::scheme" attribute that returns the name of the
underlying partitioning scheme. o Put the start and end of the partition in the XML configuration. The start and end are the LBAs of the first and last sector (resp.) of the partition. They are currently identical to the offset and size attributes, which describe the partition as an offset and size in bytes, but may not in the future. The start and end will be used for the logical partition boundaries and may include metadata. The offset and size will always represent the useful storage space within the partition. Typically these two notions are the same, but for logical partitions in an extended partition, the EBR is more naturally treated as being part of the partition.
-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 0ad3c61..ac8b3d7 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -1579,6 +1579,10 @@ g_part_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
entry = pp->private;
if (entry == NULL)
return;
+ sbuf_printf(sb, "%s<start>%ju</start>\n", indent,
+ (uintmax_t)entry->gpe_start);
+ sbuf_printf(sb, "%s<end>%ju</end>\n", indent,
+ (uintmax_t)entry->gpe_end);
sbuf_printf(sb, "%s<index>%u</index>\n", indent,
entry->gpe_index);
sbuf_printf(sb, "%s<type>%s</type>\n", indent,
@@ -1687,6 +1691,9 @@ g_part_start(struct bio *bp)
if (g_handleattr_int(bp, "PART::offset",
table->gpt_offset + entry->gpe_start))
return;
+ if (g_handleattr_str(bp, "PART::scheme",
+ table->gpt_scheme->name))
+ return;
if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) {
/*
* Check that the partition is suitable for kernel
OpenPOWER on IntegriCloud