[PATCH] fixup! blspec: factor out generic parts into bootscan helper
Ahmad Fatoum
a.fatoum at pengutronix.de
Sun Apr 13 23:22:52 PDT 2025
From: Ahmad Fatoum <a.fatoum at barebox.org>
blspec: fix detection of XBOOTLDR partitions
XBOOTLDR partitions are identified by a specific partition type or type
UUID, but this got broken during the rework to use bootscan, because we
are now iterating over partitions (partcdev) instead of all cdevs
beneath a device (cdev).
Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/blspec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/blspec.c b/common/blspec.c
index 373ad99a632c..5223ac30f8a5 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -510,8 +510,8 @@ static int blspec_scan_disk(struct bootscanner *scanner,
* partition with the MBR type id of 0xEA already exists it
* should be used as $BOOT
*/
- if (cdev_is_mbr_partitioned(cdev->master) && cdev->dos_partition_type == 0xea) {
- ret = boot_scan_cdev(scanner, bootentries, cdev);
+ if (cdev_is_mbr_partitioned(cdev) && partcdev->dos_partition_type == 0xea) {
+ ret = boot_scan_cdev(scanner, bootentries, partcdev);
if (ret == 0)
ret = -ENOENT;
--
2.39.5
More information about the barebox
mailing list