mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-07 11:36:37 +00:00
Add some error messages when things don't work.
Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
df87084fca
commit
b0712c5fc8
13
shim.c
13
shim.c
@ -914,8 +914,10 @@ should_use_fallback(EFI_HANDLE image_handle)
|
|||||||
|
|
||||||
rc = uefi_call_wrapper(BS->HandleProtocol, 3, image_handle,
|
rc = uefi_call_wrapper(BS->HandleProtocol, 3, image_handle,
|
||||||
&loaded_image_protocol, (void **)&li);
|
&loaded_image_protocol, (void **)&li);
|
||||||
if (EFI_ERROR(rc))
|
if (EFI_ERROR(rc)) {
|
||||||
|
Print(L"Could not get image for bootx64.efi: %d\n", rc);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
bootpath = DevicePathToStr(li->FilePath);
|
bootpath = DevicePathToStr(li->FilePath);
|
||||||
|
|
||||||
@ -934,16 +936,21 @@ should_use_fallback(EFI_HANDLE image_handle)
|
|||||||
|
|
||||||
rc = uefi_call_wrapper(BS->HandleProtocol, 3, li->DeviceHandle,
|
rc = uefi_call_wrapper(BS->HandleProtocol, 3, li->DeviceHandle,
|
||||||
&FileSystemProtocol, (void **)&fio);
|
&FileSystemProtocol, (void **)&fio);
|
||||||
if (EFI_ERROR(rc))
|
if (EFI_ERROR(rc)) {
|
||||||
|
Print(L"Could not get fio for li->DeviceHandle: %d\n", rc);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
rc = uefi_call_wrapper(fio->OpenVolume, 2, fio, &vh);
|
rc = uefi_call_wrapper(fio->OpenVolume, 2, fio, &vh);
|
||||||
if (EFI_ERROR(rc))
|
if (EFI_ERROR(rc)) {
|
||||||
|
Print(L"Could not open fio volume: %d\n", rc);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
rc = uefi_call_wrapper(vh->Open, 5, vh, &fh, L"\\EFI\\BOOT" FALLBACK,
|
rc = uefi_call_wrapper(vh->Open, 5, vh, &fh, L"\\EFI\\BOOT" FALLBACK,
|
||||||
EFI_FILE_READ_ONLY, 0);
|
EFI_FILE_READ_ONLY, 0);
|
||||||
if (EFI_ERROR(rc)) {
|
if (EFI_ERROR(rc)) {
|
||||||
|
Print(L"Could not open \"\\EFI\\BOOT%s\": %d\n", FALLBACK, rc);
|
||||||
uefi_call_wrapper(vh->Close, 1, vh);
|
uefi_call_wrapper(vh->Close, 1, vh);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user