From owner-svn-src-all@freebsd.org Sat Aug 26 18:29:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81AE0DD7D7F; Sat, 26 Aug 2017 18:29:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45F2974637; Sat, 26 Aug 2017 18:29:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7QITct8099443; Sat, 26 Aug 2017 18:29:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7QITcjP099439; Sat, 26 Aug 2017 18:29:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708261829.v7QITcjP099439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 26 Aug 2017 18:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322931 - in head/sys/boot/efi: boot1 include loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot/efi: boot1 include loader X-SVN-Commit-Revision: 322931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Aug 2017 18:29:39 -0000 Author: imp Date: Sat Aug 26 18:29:37 2017 New Revision: 322931 URL: https://svnweb.freebsd.org/changeset/base/322931 Log: 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 Modified: head/sys/boot/efi/boot1/boot1.c head/sys/boot/efi/include/efiapi.h head/sys/boot/efi/include/efilib.h head/sys/boot/efi/loader/efi_main.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Sat Aug 26 18:29:24 2017 (r322930) +++ head/sys/boot/efi/boot1/boot1.c Sat Aug 26 18:29:37 2017 (r322931) @@ -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; Modified: head/sys/boot/efi/include/efiapi.h ============================================================================== --- head/sys/boot/efi/include/efiapi.h Sat Aug 26 18:29:24 2017 (r322930) +++ head/sys/boot/efi/include/efiapi.h Sat Aug 26 18:29:37 2017 (r322931) @@ -353,7 +353,7 @@ EFI_STATUS IN EFI_STATUS ExitStatus, IN UINTN ExitDataSize, IN CHAR16 *ExitData OPTIONAL - ); + ) __dead2; typedef EFI_STATUS Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Sat Aug 26 18:29:24 2017 (r322930) +++ head/sys/boot/efi/include/efilib.h Sat Aug 26 18:29:37 2017 (r322931) @@ -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. */ Modified: head/sys/boot/efi/loader/efi_main.c ============================================================================== --- head/sys/boot/efi/loader/efi_main.c Sat Aug 26 18:29:24 2017 (r322930) +++ head/sys/boot/efi/loader/efi_main.c Sat Aug 26 18:29:37 2017 (r322931) @@ -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 *sy status = main(argc, argv); exit(status); + return (status); }