1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-07 11:15:09 +02:00

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>
This commit is contained in:
Simon Glass
2024-11-07 14:31:43 -07:00
committed by Heinrich Schuchardt
parent efe9bd4a08
commit 9fd623afed
6 changed files with 67 additions and 64 deletions

View File

@@ -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);
}