disk: part_efi: skip the verification when partition size is smaller 25/277125/2
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 1 Jul 2022 03:41:20 +0000 (12:41 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 1 Jul 2022 05:26:54 +0000 (14:26 +0900)
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 <jh80.chung@samsung.com>
disk/part_efi.c

index fdca91a..d340469 100644 (file)
@@ -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);