aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_bootmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi_loader/efi_bootmgr.c')
-rw-r--r--lib/efi_loader/efi_bootmgr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 234073ecb7..4b24b41047 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -19,6 +19,9 @@
static const struct efi_boot_services *bs;
static const struct efi_runtime_services *rs;
+const efi_guid_t efi_guid_bootmenu_auto_generated =
+ EFICONFIG_AUTO_GENERATED_ENTRY_GUID;
+
/*
* bootmgr implements the logic of trying to find a payload to boot
* based on the BootOrder + BootXXXX variables, and then loading it.
@@ -243,6 +246,10 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle,
}
/* Set load options */
+ if (size >= sizeof(efi_guid_t) &&
+ !guidcmp(lo.optional_data, &efi_guid_bootmenu_auto_generated))
+ size = 0;
+
if (size) {
*load_options = malloc(size);
if (!*load_options) {