From: Jaehoon Chung Date: Fri, 1 Jul 2022 03:41:20 +0000 (+0900) Subject: disk: part_efi: skip the verification when partition size is smaller X-Git-Tag: accepted/tizen/unified/20221108.163909~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=423971abecfee30f6885bc99c18c9ec59fa8b0d8;p=platform%2Fkernel%2Fu-boot.git disk: part_efi: skip the verification when partition size is smaller In tizen, user partition is created as remained disk size. It's a difficult to fix to constant value. This patch is help to skip the verification if partition size is smaller than real size. Change-Id: I7156ddd8b62aec5e931b5fa14a9ad5a262a3a646 Signed-off-by: Jaehoon Chung --- diff --git a/disk/part_efi.c b/disk/part_efi.c index 5090efd119..49a2bc2e51 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -838,6 +838,9 @@ int gpt_verify_partitions(struct blk_desc *dev_desc, if ((i == parts - 1) && (partitions[i].size == 0)) continue; + if (partitions[i].size < le64_to_cpu(gpt_part_size)) + continue; + pr_err("Partition %s size: %llu does not match %llu!\n", efi_str, (unsigned long long)gpt_part_size, (unsigned long long)partitions[i].size);