void *load_options)
{
struct efi_loaded_image *loaded_image_info;
+ struct efi_handler *handler;
efi_status_t ret;
- ret = EFI_CALL(systab.boottime->open_protocol(
- handle,
- &efi_guid_loaded_image,
- (void **)&loaded_image_info,
- efi_root, NULL,
- EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL));
+ ret = efi_search_protocol(handle, &efi_guid_loaded_image, &handler);
+ loaded_image_info = handler->protocol_interface;
if (ret != EFI_SUCCESS)
return EFI_INVALID_PARAMETER;
loaded_image_info->load_options = load_options;
loaded_image_info->load_options_size = load_options_size;
- return EFI_CALL(systab.boottime->close_protocol(handle,
- &efi_guid_loaded_image,
- efi_root, NULL));
+ return EFI_SUCCESS;
}
/**