cmd: efidebug: make some boot variables non-volatile
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 4 Jun 2019 06:52:10 +0000 (15:52 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 4 Jun 2019 21:56:14 +0000 (23:56 +0200)
Boot####, BootOrder and BootNext should be non-volatile.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/efidebug.c

index c4ac9dd634e2628fe19472a47fd435d0114fae7a..e6572262545557ac02b3d0ad3555f11a93a436b0 100644 (file)
@@ -558,6 +558,7 @@ static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag,
        }
 
        ret = EFI_CALL(RT->set_variable(var_name16, &guid,
+                                       EFI_VARIABLE_NON_VOLATILE |
                                        EFI_VARIABLE_BOOTSERVICE_ACCESS |
                                        EFI_VARIABLE_RUNTIME_ACCESS,
                                        size, data));
@@ -909,6 +910,7 @@ static int do_efi_boot_next(cmd_tbl_t *cmdtp, int flag,
        guid = efi_global_variable_guid;
        size = sizeof(u16);
        ret = EFI_CALL(RT->set_variable(L"BootNext", &guid,
+                                       EFI_VARIABLE_NON_VOLATILE |
                                        EFI_VARIABLE_BOOTSERVICE_ACCESS |
                                        EFI_VARIABLE_RUNTIME_ACCESS,
                                        size, &bootnext));
@@ -964,6 +966,7 @@ static int do_efi_boot_order(cmd_tbl_t *cmdtp, int flag,
 
        guid = efi_global_variable_guid;
        ret = EFI_CALL(RT->set_variable(L"BootOrder", &guid,
+                                       EFI_VARIABLE_NON_VOLATILE |
                                        EFI_VARIABLE_BOOTSERVICE_ACCESS |
                                        EFI_VARIABLE_RUNTIME_ACCESS,
                                        size, bootorder));