From f0bd2e3ec0daeece7397d2b9e7ec5c3b75c10acf Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Thu, 11 Oct 2012 21:05:01 -0400 Subject: [PATCH] Remove LoadImage/StartImage support Some systems will show an error dialog if LoadImage() returned EFI_ACCESS_DENIED, which then requires physical user interaction to skip. Let's just remove the LoadImage/StartImage code, since the built-in code is theoretically equivalent. --- shim.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/shim.c b/shim.c index c1af0c8..4eab87a 100644 --- a/shim.c +++ b/shim.c @@ -941,7 +941,6 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath) EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL; EFI_STATUS efi_status; EFI_LOADED_IMAGE *li, li_bak; - EFI_HANDLE handle = NULL; EFI_DEVICE_PATH *path; CHAR16 *PathName; void *data = NULL; @@ -962,18 +961,6 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath) goto done; } - efi_status = uefi_call_wrapper(BS->LoadImage, 6, FALSE, image_handle, - path, NULL, 0, &handle); - - if (efi_status == EFI_SUCCESS) { - /* Image validates - start it */ - Print(L"Starting file via StartImage\n"); - efi_status = uefi_call_wrapper(BS->StartImage, 3, handle, NULL, - NULL); - uefi_call_wrapper(BS->UnloadImage, 1, handle); - goto done; - } - efi_status = load_image(li, &data, &datasize, PathName); if (efi_status != EFI_SUCCESS) {