From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fixup! blspec: factor out generic parts into bootscan helper
Date: Mon, 14 Apr 2025 08:22:52 +0200 [thread overview]
Message-ID: <20250414062252.2720968-1-a.fatoum@pengutronix.de> (raw)
From: Ahmad Fatoum <a.fatoum@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@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
next reply other threads:[~2025-04-14 6:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 6:22 Ahmad Fatoum [this message]
2025-04-14 8:57 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250414062252.2720968-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox