From: Heinrich Schuchardt Date: Wed, 7 Aug 2024 00:13:45 +0000 (+0200) Subject: boot: set correct block device name in set_efi_bootdev() X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=ed3ce65958ceb5a7045748e329f4e1dbef5e99e9;p=u-boot.git 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 Reviewed-by: Mattijs Korpershoek Reviewed-by: Ilias Apalodimas Reviewed-by: Simon Glass --- diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 39232eb2e2..6b41c0999f 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); }