]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: replace efi_create_handle/add_protocol with InstallMultipleProtocol
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Thu, 6 Oct 2022 13:08:44 +0000 (16:08 +0300)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 6 Oct 2022 20:54:58 +0000 (22:54 +0200)
commitf7fb2baf7ddecd03a526a14819ff5fc299f85a3a
treedd64567f7dee81a24da8d6b66daa84230d262fb9
parenta6a2b32dc147505e3ccfdaf5b5ce2cc0cc5bc547
cmd: replace efi_create_handle/add_protocol with InstallMultipleProtocol

In general handles should only be deleted if the last remaining protocol
is removed.  Instead of explicitly calling
efi_create_handle -> efi_add_protocol -> efi_delete_handle which blindly
removes all protocols from a handle before removing it,  use
InstallMultiple/UninstallMultiple which adheres to the EFI spec and only
deletes a handle if there are no additional protocols present

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/bootefi.c