From d38c6face91633ba83e00a0eecfe4821328117ca Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 2 Sep 2017 07:04:06 +0000 Subject: [PATCH] The hard drive media device path contains the size of the partition, not its end. This makes the GEOM efimedia attribute match the FreeBSD:Boot1Device environment variable now. Sponsored by: Netflix --- sys/geom/part/g_part_gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index a7e9f88df94e..e34384e98605 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -735,7 +735,7 @@ g_part_gpt_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry, sbuf_printf(sb, "HD(%d,GPT,", entry->base.gpe_index); sbuf_printf_uuid(sb, &entry->ent.ent_uuid); sbuf_printf(sb, ",%#jx,%#jx)", (intmax_t)entry->base.gpe_start, - (intmax_t)entry->base.gpe_end); + (intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 1)); sbuf_printf(sb, "\n"); } else { /* confxml: scheme information */