efi_loader: error message if BootOrder not defined
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 24 Feb 2019 03:44:48 +0000 (04:44 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 25 Feb 2019 11:39:47 +0000 (12:39 +0100)
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

index 196116b54729b871e1aa864af2cb981e835a1537..f4b1889dc63a16de1abfa8e0c3f379535eb6e11c 100644 (file)
@@ -184,8 +184,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++) {