summaryrefslogtreecommitdiff
path: root/lib/execute.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 /lib/execute.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 'lib/execute.c')
-rw-r--r--lib/execute.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/execute.c b/lib/execute.c
index 7bd775fa..366af3c8 100644
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -101,23 +101,21 @@ execute(EFI_HANDLE image, CHAR16 *name)
EFI_DEVICE_PATH *devpath;
CHAR16 *PathName;
- efi_status = uefi_call_wrapper(BS->HandleProtocol, 3, image,
- &IMAGE_PROTOCOL, (void **)&li);
+ efi_status = gBS->HandleProtocol(image, &IMAGE_PROTOCOL,
+ (void **) &li);
if (EFI_ERROR(efi_status))
return efi_status;
-
efi_status = generate_path(name, li, &devpath, &PathName);
if (EFI_ERROR(efi_status))
return efi_status;
- efi_status = uefi_call_wrapper(BS->LoadImage, 6, FALSE, image,
- devpath, NULL, 0, &h);
+ efi_status = gBS->LoadImage(FALSE, image, devpath, NULL, 0, &h);
if (EFI_ERROR(efi_status))
goto out;
- efi_status = uefi_call_wrapper(BS->StartImage, 3, h, NULL, NULL);
- uefi_call_wrapper(BS->UnloadImage, 1, h);
+ efi_status = gBS->StartImage(h, NULL, NULL);
+ gBS->UnloadImage(h);
out:
FreePool(PathName);