Skip to content
Commit 64550274 authored by Masahisa Kojima's avatar Masahisa Kojima Committed by Heinrich Schuchardt
Browse files

eficonfig: avoid SetVariable between GetNextVariableName calls



The current code calls efi_set_variable_int() to delete the
invalid boot option between calls to efi_get_next_variable_name_int(),
it may produce unpredictable results.

This commit moves removal of the invalid boot option outside
of the efi_get_next_variable_name_int() calls.
EFI_NOT_FOUND returned from efi_get_next_variable_name_int()
indicates we retrieved all EFI variables, it should be treated
as EFI_SUCEESS.

To address the checkpatch warning of too many leading tabs,
combine two if statement into one.

Signed-off-by: default avatarMasahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent ce327084
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment