summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/prefix/efiprefix.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/arch/x86/prefix/efiprefix.c b/src/arch/x86/prefix/efiprefix.c
index a847045a5..475ea505c 100644
--- a/src/arch/x86/prefix/efiprefix.c
+++ b/src/arch/x86/prefix/efiprefix.c
@@ -33,11 +33,15 @@ FILE_LICENCE ( GPL2_OR_LATER );
EFI_STATUS EFIAPI _efi_start ( EFI_HANDLE image_handle,
EFI_SYSTEM_TABLE *systab ) {
EFI_STATUS efirc;
+ int rc;
/* Initialise EFI environment */
if ( ( efirc = efi_init ( image_handle, systab ) ) != 0 )
return efirc;
/* Call to main() */
- return EFIRC ( main () );
+ if ( ( rc = main() ) != 0 )
+ return EFIRC ( rc );
+
+ return 0;
}