[PATCH 07/16] blspec: support boot /dev/virtioblkX
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Apr 1 03:47:57 PDT 2025
The device backing /dev/virtioblkX is called virtioY. The way the
bootloader spec code was written this results in the following working:
- boot -l /dev/virtioblk0.1
- boot -l virtio0
- boot -l /mnt/virtioblk0.1
But not:
- boot -l /dev/virtioblk0
Fix this by implementing the new .scan_disk callback. As scan_device is
just the fallback, remove the blspec_scan_disk call from it.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/blspec.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/common/blspec.c b/common/blspec.c
index b58efc06338b..9f25fa63c8e7 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -549,15 +549,6 @@ static int blspec_scan_device(struct bootscanner *scanner,
pr_debug("%s: %s\n", __func__, dev_name(dev));
- list_for_each_entry(cdev, &dev->cdevs, devices_list) {
- if (cdev_is_partition(cdev))
- continue;
-
- ret = blspec_scan_disk(scanner, bootentries, cdev);
- if (ret)
- return ret;
- }
-
/* Try child devices */
device_for_each_child(dev, child) {
ret = blspec_scan_device(scanner, bootentries, child);
@@ -582,6 +573,7 @@ static struct bootscanner blspec_scanner = {
.name = "blspec",
.scan_file = blspec_scan_file,
.scan_directory = blspec_scan_directory,
+ .scan_disk = blspec_scan_disk,
.scan_device = blspec_scan_device,
};
--
2.39.5
More information about the barebox
mailing list