[U-Boot] [PATCH 6/9] efi_loader: refactor efi_uninstall_protocol_interface

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Jul 5 16:18:52 UTC 2017


For the implementation of UninstallMultipleProtocolInterfaces we
need to call efi_uninstall_protocol_interface. In internal calls
we should not pass through EFI_EXIT.

The patch introduces a wrapper function
efi_uninstall_protocol_interface_ext.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 lib/efi_loader/efi_boottime.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 0075ccaaa2..607287d01f 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -382,8 +382,6 @@ static efi_status_t EFIAPI efi_uninstall_protocol_interface(void *handle,
 	int i;
 	efi_status_t r = EFI_NOT_FOUND;
 
-	EFI_ENTRY("%p, %p, %p", handle, protocol, protocol_interface);
-
 	if (!handle || !protocol) {
 		r = EFI_INVALID_PARAMETER;
 		goto out;
@@ -412,7 +410,16 @@ static efi_status_t EFIAPI efi_uninstall_protocol_interface(void *handle,
 	}
 
 out:
-	return EFI_EXIT(r);
+	return r;
+}
+
+static efi_status_t EFIAPI efi_uninstall_protocol_interface_ext(void *handle,
+			efi_guid_t *protocol, void *protocol_interface)
+{
+	EFI_ENTRY("%p, %p, %p", handle, protocol, protocol_interface);
+
+	return EFI_EXIT(efi_uninstall_protocol_interface(handle, protocol,
+							 protocol_interface));
 }
 
 static efi_status_t EFIAPI efi_register_protocol_notify(efi_guid_t *protocol,
@@ -900,7 +907,7 @@ static const struct efi_boot_services efi_boot_services = {
 	.check_event = efi_check_event,
 	.install_protocol_interface = efi_install_protocol_interface_ext,
 	.reinstall_protocol_interface = efi_reinstall_protocol_interface,
-	.uninstall_protocol_interface = efi_uninstall_protocol_interface,
+	.uninstall_protocol_interface = efi_uninstall_protocol_interface_ext,
 	.handle_protocol = efi_handle_protocol,
 	.reserved = NULL,
 	.register_protocol_notify = efi_register_protocol_notify,
-- 
2.11.0



More information about the U-Boot mailing list