summaryrefslogtreecommitdiff
path: root/cmd/efidebug.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-08-07 18:49:39 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-08-08 20:03:24 +0300
commit0ad64007feb93dced461647c75f782160b1c8ede (patch)
treed42e685d39a74b5e8273dcd97347f24870126a2b /cmd/efidebug.c
parent1064d04920beba5564c84fde1993dd39c809ed49 (diff)
downloadu-boot-0ad64007feb93dced461647c75f782160b1c8ede.tar.xz
efi_loader: set load options in boot manager
Up to now we used the value of the bootargs environment variable as load options in the boot manager. This is not correct. The data has to be taken from the Boot#### variable. Let the boot manager copy the optional data of the EFI_LOAD_OPTION as load options to the loaded image protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd/efidebug.c')
-rw-r--r--cmd/efidebug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 58018f700c..d00d4247dc 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -1126,8 +1126,9 @@ static int do_efi_test_bootmgr(struct cmd_tbl *cmdtp, int flag,
efi_uintn_t exit_data_size = 0;
u16 *exit_data = NULL;
efi_status_t ret;
+ void *load_options;
- ret = efi_bootmgr_load(&image);
+ ret = efi_bootmgr_load(&image, &load_options);
printf("efi_bootmgr_load() returned: %ld\n", ret & ~EFI_ERROR_MASK);
/* We call efi_start_image() even if error for test purpose. */
@@ -1138,6 +1139,7 @@ static int do_efi_test_bootmgr(struct cmd_tbl *cmdtp, int flag,
efi_restore_gd();
+ free(load_options);
return CMD_RET_SUCCESS;
}