aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schmitt <scdbackup@gmx.net>2014-06-22 22:24:19 +0200
committerH. Peter Anvin <hpa@zytor.com>2014-06-23 19:48:56 -0700
commita9343ca8943ae2089d46f74ce521946fb6f9f56d (patch)
tree47506d35ee18cbbd583ecc5454a8ef42a7c8b5df
parentee9c8a36dc63c54794f5836d5c908d7e4c84fa04 (diff)
downloadsyslinux-a9343ca8943ae2089d46f74ce521946fb6f9f56d.tar.gz
syslinux-a9343ca8943ae2089d46f74ce521946fb6f9f56d.tar.xz
syslinux-a9343ca8943ae2089d46f74ce521946fb6f9f56d.zip
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 <hpa@zytor.com>
-rw-r--r--utils/isohybrid.c2
1 files changed, 1 insertions, 1 deletions
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);