svn commit: r326047 - head/sys/geom/part
Warner Losh
imp at FreeBSD.org
Tue Nov 21 05:35:23 UTC 2017
Author: imp
Date: Tue Nov 21 05:35:21 2017
New Revision: 326047
URL: https://svnweb.freebsd.org/changeset/base/326047
Log:
Implement efi media tagging for MBR partitioning types.
Sponsored by: Netflix
Modified:
head/sys/geom/part/g_part_mbr.c
Modified: head/sys/geom/part/g_part_mbr.c
==============================================================================
--- head/sys/geom/part/g_part_mbr.c Tue Nov 21 03:15:32 2017 (r326046)
+++ head/sys/geom/part/g_part_mbr.c Tue Nov 21 05:35:21 2017 (r326047)
@@ -303,11 +303,14 @@ g_part_mbr_destroy(struct g_part_table *basetable, str
}
static void
-g_part_mbr_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry,
+g_part_mbr_dumpconf(struct g_part_table *basetable, struct g_part_entry *baseentry,
struct sbuf *sb, const char *indent)
{
struct g_part_mbr_entry *entry;
+ struct g_part_mbr_table *table;
+ uint32_t dsn;
+ table = (struct g_part_mbr_table *)basetable;
entry = (struct g_part_mbr_entry *)baseentry;
if (indent == NULL) {
/* conftxt: libdisk compatibility */
@@ -318,6 +321,11 @@ g_part_mbr_dumpconf(struct g_part_table *table, struct
entry->ent.dp_typ);
if (entry->ent.dp_flag & 0x80)
sbuf_printf(sb, "%s<attrib>active</attrib>\n", indent);
+ dsn = le32dec(table->mbr + DOSDSNOFF);
+ sbuf_printf(sb, "%s<efimedia>HD(%d,MBR,%d,%#jx,%#jx)", indent,
+ entry->base.gpe_index, dsn, (intmax_t)entry->base.gpe_start,
+ (intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 1));
+ sbuf_printf(sb, "</efimedia>\n");
} else {
/* confxml: scheme information */
}
More information about the svn-src-head
mailing list