summaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-08-19 18:24:58 -0600
committerTom Rini <[email protected]>2024-08-19 18:24:58 -0600
commit158cf0270cb6691bc7f58fbeb4c6b8b603957bfe (patch)
tree0e2cfa0d2d6e3dd24e72d5cd29caba5b4b51e01d /disk
parentaa2efb08732aa4daded61fca8e488eb211b28ce4 (diff)
parentd11a60610e17373331ad17b6c5c31735cf9fffa8 (diff)
Merge tag 'v2024.10-rc3' into next
Prepare v2024.10-rc3
Diffstat (limited to 'disk')
-rw-r--r--disk/part.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/disk/part.c b/disk/part.c
index bc932526f90..706d77b3194 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -285,6 +285,13 @@ void part_init(struct blk_desc *desc)
blkcache_invalidate(desc->uclass_id, desc->devnum);
+ if (desc->part_type != PART_TYPE_UNKNOWN) {
+ for (entry = drv; entry != drv + n_ents; entry++) {
+ if (entry->part_type == desc->part_type && !entry->test(desc))
+ return;
+ }
+ }
+
desc->part_type = PART_TYPE_UNKNOWN;
for (entry = drv; entry != drv + n_ents; entry++) {
int ret;
@@ -304,7 +311,8 @@ static void print_part_header(const char *type, struct blk_desc *desc)
CONFIG_IS_ENABLED(DOS_PARTITION) || \
CONFIG_IS_ENABLED(ISO_PARTITION) || \
CONFIG_IS_ENABLED(AMIGA_PARTITION) || \
- CONFIG_IS_ENABLED(EFI_PARTITION)
+ CONFIG_IS_ENABLED(EFI_PARTITION) || \
+ CONFIG_IS_ENABLED(MTD_PARTITIONS)
printf("\nPartition Map for %s device %d -- Partition Type: %s\n\n",
uclass_get_name(desc->uclass_id), desc->devnum, type);
#endif /* any CONFIG_..._PARTITION */