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: submit/tizen/20220704.015536~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05a643898484e9158074820a7ab449fc954f059c;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 fdca91a697..d3404699dd 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -759,6 +759,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);