From 9fd623afede63a7049b498bbc285f3555eb2bf26 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 7 Nov 2024 14:31:43 -0700 Subject: efi: Move default filename to a function Use a function to obtain the device EFI filename, so that we can control how sandbox behaves. Signed-off-by: Simon Glass --- lib/efi_loader/efi_bootmgr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/efi_loader/efi_bootmgr.c') diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index f9b5988a06e..8c51a6ef2ed 100644 --- a/lib/efi_loader/efi_bootmgr.c +++ b/lib/efi_loader/efi_bootmgr.c @@ -11,10 +11,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -82,8 +82,12 @@ struct efi_device_path *expand_media_path(struct efi_device_path *device_path) &efi_simple_file_system_protocol_guid, &rem); if (handle) { if (rem->type == DEVICE_PATH_TYPE_END) { - full_path = efi_dp_from_file(device_path, - "/EFI/BOOT/" BOOTEFI_NAME); + char fname[30]; + + snprintf(fname, sizeof(fname), "/EFI/BOOT/%s", + efi_get_basename()); + full_path = efi_dp_from_file(device_path, fname); + } else { full_path = efi_dp_dup(device_path); } -- cgit v1.2.3