efi: Create the grub_efi_close_protocol() library function

Create a library function for CloseProtocol() and use it for the SNP driver.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Heinrich Schuchardt authored and Daniel Kiper committed 2021-12-23 01:33:13 +01:00
1 parent efd9406e12
commit d0219bffc7
3 files changed
+12 -6

No files matched your search

+8
View File
@@ -117,6 +117,14 @@ grub_efi_open_protocol (grub_efi_handle_t handle,
return interface;
}
grub_efi_status_t
grub_efi_close_protocol (grub_efi_handle_t handle, grub_efi_guid_t *protocol)
{
grub_efi_boot_services_t *b = grub_efi_system_table->boot_services;
return efi_call_4 (b->close_protocol, handle, protocol, grub_efi_image_handle, NULL);
}
int
grub_efi_set_text_mode (int on)
{