summaryrefslogtreecommitdiffstats
path: root/disk/part_efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'disk/part_efi.c')
-rw-r--r--disk/part_efi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk/part_efi.c b/disk/part_efi.c
index fe308d76a9..0af1e9248d 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -439,7 +439,7 @@ int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e,
gpt_e[i].starting_lba = cpu_to_le64(offset);
offset += partitions[i].size;
}
- if (offset >= last_usable_lba) {
+ if (offset > (last_usable_lba + 1)) {
printf("Partitions layout exceds disk size\n");
return -1;
}
OpenPOWER on IntegriCloud