From 9cb069b552b23198fe5a43b25ce50d92b2da0e53 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 6 Aug 2019 20:13:28 +0000 Subject: [PATCH] loader.efi: efilib.h and libefi.c were left out of 350654 And this is second followup for 350654 --- stand/efi/include/efilib.h | 1 + stand/efi/libefi/libefi.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/stand/efi/include/efilib.h b/stand/efi/include/efilib.h index 6ca41d848384..44ddb2d40564 100644 --- a/stand/efi/include/efilib.h +++ b/stand/efi/include/efilib.h @@ -70,6 +70,7 @@ pdinfo_t *efiblk_get_pdinfo_by_handle(EFI_HANDLE h); pdinfo_t *efiblk_get_pdinfo_by_device_path(EFI_DEVICE_PATH *path); void *efi_get_table(EFI_GUID *tbl); +EFI_STATUS OpenProtocolByHandle(EFI_HANDLE, EFI_GUID *, void **); int efi_getdev(void **vdev, const char *devspec, const char **path); char *efi_fmtdev(void *vdev); diff --git a/stand/efi/libefi/libefi.c b/stand/efi/libefi/libefi.c index e0a721f58b32..e7b1406839fe 100644 --- a/stand/efi/libefi/libefi.c +++ b/stand/efi/libefi/libefi.c @@ -50,3 +50,10 @@ efi_get_table(EFI_GUID *tbl) } return (NULL); } + +EFI_STATUS +OpenProtocolByHandle(EFI_HANDLE handle, EFI_GUID *protocol, void **interface) +{ + return (BS->OpenProtocol(handle, protocol, interface, IH, NULL, + EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL)); +}