summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2013-05-15 13:38:27 -0400
committerPeter Jones <pjones@redhat.com>2013-05-15 13:38:27 -0400
commitb0712c5fc8528335fca87de8448abf6eb17278e2 (patch)
treeb58c428f79dfe7d761adbd612542fb083d5941f7
parentdf87084fca75948b72fc49868a92493a77a1999d (diff)
downloadefi-boot-shim-b0712c5fc8528335fca87de8448abf6eb17278e2.tar.gz
efi-boot-shim-b0712c5fc8528335fca87de8448abf6eb17278e2.zip
Add some error messages when things don't work.
Signed-off-by: Peter Jones <pjones@redhat.com>
-rw-r--r--shim.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/shim.c b/shim.c
index 33d4396d..16b2faa9 100644
--- a/shim.c
+++ b/shim.c
@@ -914,8 +914,10 @@ should_use_fallback(EFI_HANDLE image_handle)
rc = uefi_call_wrapper(BS->HandleProtocol, 3, image_handle,
&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;
+ }
bootpath = DevicePathToStr(li->FilePath);
@@ -934,16 +936,21 @@ should_use_fallback(EFI_HANDLE image_handle)
rc = uefi_call_wrapper(BS->HandleProtocol, 3, li->DeviceHandle,
&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;
+ }
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;
+ }
rc = uefi_call_wrapper(vh->Open, 5, vh, &fh, L"\\EFI\\BOOT" FALLBACK,
EFI_FILE_READ_ONLY, 0);
if (EFI_ERROR(rc)) {
+ Print(L"Could not open \"\\EFI\\BOOT%s\": %d\n", FALLBACK, rc);
uefi_call_wrapper(vh->Close, 1, vh);
return 0;
}