summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_bootmgr.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-11-07 14:31:43 -0700
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-11-09 10:00:38 +0100
commit9fd623afede63a7049b498bbc285f3555eb2bf26 (patch)
treed4e2dcdd0604cc60223fc0a314806cea5d60e4ca /lib/efi_loader/efi_bootmgr.c
parentefe9bd4a088c958eefaaf39bb83320871669662e (diff)
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 <sjg@chromium.org>
Diffstat (limited to 'lib/efi_loader/efi_bootmgr.c')
-rw-r--r--lib/efi_loader/efi_bootmgr.c10
1 files changed, 7 insertions, 3 deletions
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 <blkmap.h>
#include <charset.h>
#include <dm.h>
+#include <efi.h>
#include <log.h>
#include <malloc.h>
#include <net.h>
-#include <efi_default_filename.h>
#include <efi_loader.h>
#include <efi_variable.h>
#include <asm/unaligned.h>
@@ -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);
}