aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahisa Kojima <masahisa.kojima@linaro.org>2024-01-12 09:19:21 +0900
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-01-21 11:24:24 +0100
commiteb2f0867a179c4f6cef4dd67deb7fb2bf2faf923 (patch)
tree363b4e39bca5ca0cd4919c49fa1388c18015a675
parente75e4cf5d91012fa8af327177a7927daabfcf931 (diff)
downloadu-boot-eb2f0867a179c4f6cef4dd67deb7fb2bf2faf923.zip
u-boot-eb2f0867a179c4f6cef4dd67deb7fb2bf2faf923.tar.gz
u-boot-eb2f0867a179c4f6cef4dd67deb7fb2bf2faf923.tar.bz2
efi_loader: rename check_disk_has_default_file function
check_disk_has_default_file() function checks if the architecture-specific default file exists on the block device, and fills the default file device path if it exists. Rename the function name to fill_default_file_path(). Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--lib/efi_loader/efi_bootmgr.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 68d7db5..404af28 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -294,14 +294,17 @@ err:
}
/**
- * check_disk_has_default_file() - load the default file
+ * fill_default_file_path() - get fallback boot device path for block device
+ *
+ * Provide the device path to the fallback UEFI boot file, e.g.
+ * EFI/BOOT/BOOTAA64.EFI if that file exists on the block device @blk.
*
* @blk: pointer to the UCLASS_BLK udevice
- * @dp: pointer to default file device path
+ * @dp: pointer to store the fallback boot device path
* Return: status code
*/
-static efi_status_t check_disk_has_default_file(struct udevice *blk,
- struct efi_device_path **dp)
+static efi_status_t fill_default_file_path(struct udevice *blk,
+ struct efi_device_path **dp)
{
efi_status_t ret;
struct udevice *partition;
@@ -348,7 +351,7 @@ static efi_status_t prepare_loaded_image(u16 *label, ulong addr, ulong size,
if (!ramdisk_blk)
return EFI_LOAD_ERROR;
- ret = check_disk_has_default_file(ramdisk_blk, dp);
+ ret = fill_default_file_path(ramdisk_blk, dp);
if (ret != EFI_SUCCESS) {
log_info("Cannot boot from downloaded image\n");
goto err;