summaryrefslogtreecommitdiff
path: root/netboot.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2017-09-28 14:11:51 -0400
committerPeter Jones <pmjones@gmail.com>2018-03-12 16:21:43 -0400
commit9fdca5bbe11e384198372b86a6b81d5d9e79fa16 (patch)
treefd270546473ce1869fd315d29dc984dcd793d928 /netboot.c
parent1c2376338d57c900fbc1c2fe6d9c30cfe20e44be (diff)
downloadefi-boot-shim-9fdca5bbe11e384198372b86a6b81d5d9e79fa16.tar.gz
efi-boot-shim-9fdca5bbe11e384198372b86a6b81d5d9e79fa16.zip
Don't use uefi_call_wrapper(), ever.
I'm pretty done with typing uefi_call_wrapper() and counting arguments every time. Instead, just make the compiler error if we don't have ms_abi. Also, make it so nothing can use uefi_call_wrapper() directly. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'netboot.c')
-rw-r--r--netboot.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/netboot.c b/netboot.c
index 893e4e50..ea9e150b 100644
--- a/netboot.c
+++ b/netboot.c
@@ -60,8 +60,8 @@ BOOLEAN findNetboot(EFI_HANDLE device)
{
EFI_STATUS efi_status;
- efi_status = uefi_call_wrapper(BS->HandleProtocol, 3, device,
- &PxeBaseCodeProtocol, (VOID **)&pxe);
+ efi_status = gBS->HandleProtocol(device, &PxeBaseCodeProtocol,
+ (VOID **) &pxe);
if (EFI_ERROR(efi_status)) {
pxe = NULL;
return FALSE;
@@ -333,9 +333,8 @@ EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINT64 *buf
}
try_again:
- efi_status = uefi_call_wrapper(pxe->Mtftp, 10, pxe, read, *buffer,
- overwrite, bufsiz, &blksz, &tftp_addr,
- full_path, NULL, nobuffer);
+ efi_status = pxe->Mtftp(pxe, read, *buffer, overwrite, bufsiz, &blksz,
+ &tftp_addr, full_path, NULL, nobuffer);
if (efi_status == EFI_BUFFER_TOO_SMALL) {
/* try again, doubling buf size */
*bufsiz *= 2;