[syslinux] [PATCH] protocol.h: Remove unused locate_protocol()

Matt Fleming matt at console-pimps.org
Mon Aug 22 09:44:07 PDT 2011


From: Matt Fleming <matt.fleming at intel.com>

locate_protocol() has never been used by efilinux and results in the
following build error when compiled with gnu-efi <= 3.0i,

In file included from entry.c:38:0:
protocol.h: In function 'locate_protocol':
protocol.h:62:31: error: 'EFI_BOOT_SERVICES' has no member named 'LocateProtocol'

Reported-by: KESHAV P.R. <skodabenz at gmail.com>
Reported-by: Metatech <metatechbe at gmail.com>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---

Guys, sorry this took so long to apply. I had originally hoped that
the compilation errors in upstream gnu-efi would be fixed and we
wouldn't need to remove this function, but alas gnu-efi is still
broken. I've now applied this fix to the 'master' branch.

Thanks for the report!

 protocol.h |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/protocol.h b/protocol.h
index 88b4a7b..6881d70 100644
--- a/protocol.h
+++ b/protocol.h
@@ -51,19 +51,6 @@ handle_protocol(EFI_HANDLE handle, EFI_GUID *protocol, void **interface)
 }
 
 /**
- * locate_protocol - Returns the first protocol instance for @protocol
- * @protocol: the protocol to search for
- * @registration: optional registration key
- * @interface: used to return a pointer to the first matching interface
- */
-static inline EFI_STATUS
-locate_protocol(EFI_GUID *protocol, void *registration, void **interface)
-{
-	return uefi_call_wrapper(boot->LocateProtocol, 3, protocol,
-				 registration, interface);
-}
-
-/**
  * locate_handle - Search for handles that support @protocol
  * @type: the search type, which handles are returned
  * @protocol: the protocol to search by (only valid if @type is ByProtocol)
-- 
1.7.4.4




More information about the Syslinux mailing list