From 05a643898484e9158074820a7ab449fc954f059c Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Fri, 1 Jul 2022 12:41:20 +0900 Subject: [PATCH] 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 --- disk/part_efi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/disk/part_efi.c b/disk/part_efi.c index fdca91a..d340469 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); -- 2.7.4