Cleanup efi_main return type

Make the return type of efi_main uniform. Declare the Exit() function
as not returning. Move efi_main's declaration to the proper header.

Sponsored by: Netflix
This commit is contained in:
imp 2017-08-26 18:29:37 +00:00
parent 7c7a2f621f
commit ed67956824
4 changed files with 6 additions and 7 deletions

View File

@ -47,8 +47,6 @@ static const boot_module_t *boot_modules[] =
/* The initial number of handles used to query EFI for partitions. */
#define NUM_HANDLES_INIT 24
EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab);
EFI_SYSTEM_TABLE *systab;
EFI_BOOT_SERVICES *bs;
static EFI_HANDLE *image;

View File

@ -353,7 +353,7 @@ EFI_STATUS
IN EFI_STATUS ExitStatus,
IN UINTN ExitDataSize,
IN CHAR16 *ExitData OPTIONAL
);
) __dead2;
typedef
EFI_STATUS

View File

@ -89,8 +89,10 @@ EFI_STATUS errno_to_efi_status(int errno);
void efi_time_init(void);
void efi_time_fini(void);
EFI_STATUS efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE* Xsystab);
EFI_STATUS main(int argc, CHAR16 *argv[]);
void exit(EFI_STATUS status);
void exit(EFI_STATUS status) __dead2;
void delay(int usecs);
/* EFI environment initialization. */

View File

@ -66,9 +66,7 @@ arg_skipword(CHAR16 *argp)
return (argp);
}
void efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table);
void
EFI_STATUS
efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
{
static EFI_GUID image_protocol = LOADED_IMAGE_PROTOCOL;
@ -184,4 +182,5 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
status = main(argc, argv);
exit(status);
return (status);
}