diff mbox series

[U-Boot,1/1] efi_loader: error message if BootOrder not defined

Message ID 20190224034934.15361-1-xypron.glpk@gmx.de
State Accepted, archived
Commit 33e44971a203dbadae0b7513135105b5bec156aa
Delegated to: Heinrich Schuchardt
Headers show
Series [U-Boot,1/1] efi_loader: error message if BootOrder not defined | expand

Commit Message

Heinrich Schuchardt Feb. 24, 2019, 3:49 a.m. UTC
For booting via `bootefi bootmgr` it is necessary that the EFI variable
BootOrder is defined. Provide a diagnostic message if the variable is
missing.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/efi_loader/efi_bootmgr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 8bb84f888c1..15a06085364 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -180,8 +180,10 @@  void *efi_bootmgr_load(struct efi_device_path **device_path,
 	rs = systab.runtime;
 
 	bootorder = get_var(L"BootOrder", &efi_global_variable_guid, &size);
-	if (!bootorder)
+	if (!bootorder) {
+		printf("BootOrder not defined\n");
 		goto error;
+	}
 
 	num = size / sizeof(uint16_t);
 	for (i = 0; i < num; i++) {