Message ID | 20160727131751.4608-3-julian@jusst.de |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
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);
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 <julian@jusst.de> --- disk/part_efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)