summaryrefslogtreecommitdiff
path: root/boot/bootmeth_efi.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <[email protected]>2024-08-07 02:13:45 +0200
committerHeinrich Schuchardt <[email protected]>2024-08-11 07:53:16 +0200
commited3ce65958ceb5a7045748e329f4e1dbef5e99e9 (patch)
treea8b7fbd0aaa028a8f4d5fa18d6d2f141f8111206 /boot/bootmeth_efi.c
parent751e5bfdb531aa3093e02d616a4f0bce701e8b50 (diff)
boot: set correct block device name in set_efi_bootdev()
For SATA devices the class name is 'ahci' but the block device name is 'sata'. Use function blk_get_uclass_name() to retrieve the correct string. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'boot/bootmeth_efi.c')
-rw-r--r--boot/bootmeth_efi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c
index 39232eb2e25..6b41c0999f1 100644
--- a/boot/bootmeth_efi.c
+++ b/boot/bootmeth_efi.c
@@ -100,11 +100,10 @@ static void set_efi_bootdev(struct blk_desc *desc, struct bootflow *bflow)
if (last_slash)
*last_slash = '\0';
- log_debug("setting bootdev %s, %s, %s, %p, %x\n",
- dev_get_uclass_name(media_dev), devnum_str, bflow->fname,
- bflow->buf, size);
dev_name = device_get_uclass_id(media_dev) == UCLASS_MASS_STORAGE ?
- "usb" : dev_get_uclass_name(media_dev);
+ "usb" : blk_get_uclass_name(device_get_uclass_id(media_dev));
+ log_debug("setting bootdev %s, %s, %s, %p, %x\n",
+ dev_name, devnum_str, bflow->fname, bflow->buf, size);
efi_set_bootdev(dev_name, devnum_str, bflow->fname, bflow->buf, size);
}