common: cmd_mtdparts: skip partitions exceeding flash size

Change-Id: Icc9fcd4bcc8b2d7d5e47598c1acc6058ecf203d9
Signed-off-by: Sridharan S N <quic_sridsn@quicinc.com>
This commit is contained in:
Sridharan S N 2023-08-10 17:14:29 +05:30 committed by Gerrit - the friendly Code Review server
parent 7c9be6eda9
commit 9db093d00e
2 changed files with 4 additions and 2 deletions

View file

@ -411,8 +411,7 @@ static int part_validate(struct mtdids *id, struct part_info *part)
}
if (part->offset + part->size > id->size) {
printf("%s: partitioning exceeds flash size\n", id->mtd_id);
return 1;
printf("%s: partitioning (%s) exceeds flash size\n", id->mtd_id, part->name);
}
/*

View file

@ -817,6 +817,9 @@ int fdt_node_set_part_info(void *blob, int parent_offset,
part = list_entry(pentry, struct part_info, link);
if (part->offset + part->size > dev->id->size)
continue;
debug("%2d: %-20s0x%08llx\t0x%08llx\t%d\n",
part_num, part->name, part->size,
part->offset, part->mask_flags);