summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2019-08-06 20:13:28 +0000
committerToomas Soome <tsoome@FreeBSD.org>2019-08-06 20:13:28 +0000
commit9cb069b552b23198fe5a43b25ce50d92b2da0e53 (patch)
treeb9e623a1e4286a69b918f6f2a1372421ba735ef0
parentcefffc0b45f2263ef3db1c31a1d1efced6043f0d (diff)
Notes
-rw-r--r--stand/efi/include/efilib.h1
-rw-r--r--stand/efi/libefi/libefi.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/stand/efi/include/efilib.h b/stand/efi/include/efilib.h
index 6ca41d8483840..44ddb2d405644 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 e0a721f58b329..e7b1406839fe5 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));
+}