If a partition was specified to fill the available space using size "-" a
verification is not possible as there is no sane reference value to compare
against. In this case simply skip the check to avoid printing a meaningless
error.

Signed-off-by: Julian Scheel <jul...@jusst.de>
---
 disk/part_efi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/disk/part_efi.c b/disk/part_efi.c
index 0af1e92..bb23c2a 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -654,7 +654,8 @@ int gpt_verify_partitions(struct blk_desc *dev_desc,
                      (unsigned long long)gpt_part_size,
                      (unsigned long long)partitions[i].size);
 
-               if (le64_to_cpu(gpt_part_size) != partitions[i].size) {
+               if (partitions[i].size &&
+                               le64_to_cpu(gpt_part_size) != 
partitions[i].size) {
                        error("Partition %s size: %llu does not match %llu!\n",
                              efi_str, (unsigned long long)gpt_part_size,
                              (unsigned long long)partitions[i].size);
-- 
2.9.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to