mtd: mtd_blk: Only reserve for last partition with grow tag

Change-Id: Icd3bd87b45bdb3af6688269a2332463f570f4d46
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin 2021-01-14 14:33:40 +08:00 committed by Jianhong Chen
parent ce9d2743ba
commit 69bb6ffab4
1 changed files with 2 additions and 1 deletions

View File

@ -402,7 +402,8 @@ char *mtd_part_parse(void)
(int)(size_t)info.start << 9,
info.name);
strcat(mtd_part_info, ",");
if (part_get_info(dev_desc, p + 1, &info)) {
if (part_get_info(dev_desc, p + 1, &info) &&
(info.size + info.start + 33) == dev_desc->lba) {
if (dev_desc->devnum == BLK_MTD_SPI_NOR) {
/* Nor is 64KB erase block(kernel) and gpt table just
* resserve 33 sectors for the last partition. This