summaryrefslogtreecommitdiffstats
path: root/cmd/bootefi.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r--cmd/bootefi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index d3a2331870..2a62dce702 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -209,6 +209,12 @@ static unsigned long do_bootefi_exec(void *efi, void *fdt)
#ifdef DEBUG_EFI
printf("%s:%d Jumping to 0x%lx\n", __func__, __LINE__, (long)entry);
#endif
+
+ if (setjmp(&loaded_image_info.exit_jmp)) {
+ efi_status_t status = loaded_image_info.exit_status;
+ return status == EFI_SUCCESS ? 0 : -EINVAL;
+ }
+
return entry(&loaded_image_info, &systab);
}
OpenPOWER on IntegriCloud