Date: Thu, 12 Oct 2017 15:16:16 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324557 - in head/sys/boot/efi: include loader loader/arch/i386 Message-ID: <201710121516.v9CFGGkY045929@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu Oct 12 15:16:16 2017 New Revision: 324557 URL: https://svnweb.freebsd.org/changeset/base/324557 Log: Rename exit to efi_exit to avoid clashing with libsa exit definition Rename exit to efi_exit. It doesn't have the proper signature and conflicts with standard definition. Provide the standard definition as well. Sponsored by: Netflix Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/loader/arch/i386/exec.c head/sys/boot/efi/loader/efi_main.c Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Thu Oct 12 14:57:05 2017 (r324556) +++ head/sys/boot/efi/include/efilib.h Thu Oct 12 15:16:16 2017 (r324557) @@ -95,7 +95,7 @@ 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) __dead2; +void efi_exit(EFI_STATUS status) __dead2; void delay(int usecs); /* EFI environment initialization. */ Modified: head/sys/boot/efi/loader/arch/i386/exec.c ============================================================================== --- head/sys/boot/efi/loader/arch/i386/exec.c Thu Oct 12 14:57:05 2017 (r324556) +++ head/sys/boot/efi/loader/arch/i386/exec.c Thu Oct 12 15:16:16 2017 (r324557) @@ -36,12 +36,6 @@ __FBSDID("$FreeBSD$"); uint32_t __base; struct __v86 __v86; -/* XXX - Needed a definition here to implicitly define exit(); do not remove. */ -static void -exit(int x) -{ -} - void __v86int() { Modified: head/sys/boot/efi/loader/efi_main.c ============================================================================== --- head/sys/boot/efi/loader/efi_main.c Thu Oct 12 14:57:05 2017 (r324556) +++ head/sys/boot/efi/loader/efi_main.c Thu Oct 12 15:16:16 2017 (r324557) @@ -36,13 +36,20 @@ static EFI_PHYSICAL_ADDRESS heap; static UINTN heapsize; void -exit(EFI_STATUS exit_code) +efi_exit(EFI_STATUS exit_code) { BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize)); BS->Exit(IH, exit_code, 0, NULL); } +void +exit(int status) +{ + + efi_exit(EFI_LOAD_ERROR); +} + static CHAR16 * arg_skipsep(CHAR16 *argp) { @@ -92,11 +99,11 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); - /* Use exit() from here on... */ + /* Use efi_exit() from here on... */ status = BS->HandleProtocol(IH, &image_protocol, (VOID**)&img); if (status != EFI_SUCCESS) - exit(status); + efi_exit(status); /* * Pre-process the (optional) load options. If the option string @@ -176,6 +183,6 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy argv[argc] = NULL; status = main(argc, argv); - exit(status); + efi_exit(status); return (status); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710121516.v9CFGGkY045929>