From a9343ca8943ae2089d46f74ce521946fb6f9f56d Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 22 Jun 2014 22:24:19 +0200 Subject: utils/isohybrid.c: Correct end block address of first GPT partition The GPT partition 1 covers the whole ISO filesystem size. GPT specs demand that the partition end block number shall be the last valid block in the partition. isohybrid.c rather wrote the number of the first block after the partition end. This change reduces the number by 1. Signed-off-by: H. Peter Anvin --- utils/isohybrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/isohybrid.c b/utils/isohybrid.c index 7d0864ec..ff6b9302 100644 --- a/utils/isohybrid.c +++ b/utils/isohybrid.c @@ -797,7 +797,7 @@ initialise_gpt(uint8_t *gpt, uint32_t current, uint32_t alternate, int primary) memcpy(part->partGUID, iso_uuid, sizeof(uuid_t)); memcpy(part->partTypeGUID, basic_partition, sizeof(uuid_t)); part->firstLBA = lendian_64(0); - part->lastLBA = lendian_64(psize); + part->lastLBA = lendian_64(psize - 1); memcpy(part->name, part_name_iso, 28); gpt += sizeof(struct gpt_part_header); -- cgit v1.2.3