svn commit: r326049 - head/sys/geom/part

Warner Losh imp at FreeBSD.org
Tue Nov 21 06:12:22 UTC 2017


Author: imp
Date: Tue Nov 21 06:12:21 2017
New Revision: 326049
URL: https://svnweb.freebsd.org/changeset/base/326049

Log:
  While the EFI spec allows numbers to be in many forms, libefivar
  produces hex numbers for the dsn. Since that come is from EDK2, change
  this for symmetry, by generating the dsn as a hex number.
  
  Noticed by: gpart list | grep efimedia | awk -F: '{print $2;}' | \
  	sed -e 's/^ *//g;s/,,/,/' | grep MBR | efidp -p | efidp -f
  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 05:42:13 2017	(r326048)
+++ head/sys/geom/part/g_part_mbr.c	Tue Nov 21 06:12:21 2017	(r326049)
@@ -322,7 +322,7 @@ g_part_mbr_dumpconf(struct g_part_table *basetable, st
 		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,
+		sbuf_printf(sb, "%s<efimedia>HD(%d,MBR,%#08x,%#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");


More information about the svn-src-head mailing list