From owner-svn-src-head@freebsd.org Fri Aug 4 16:33:38 2017 Return-Path: Delivered-To: svn-src-head@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 7B693DBD68E; Fri, 4 Aug 2017 16:33:38 +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 54D966F078; Fri, 4 Aug 2017 16:33:38 +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 v74GXbLP021697; Fri, 4 Aug 2017 16:33:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74GXb8T021692; Fri, 4 Aug 2017 16:33:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708041633.v74GXb8T021692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Aug 2017 16:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322056 - in head/sys/boot/efi: include libefi loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot/efi: include libefi loader X-SVN-Commit-Revision: 322056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 16:33:38 -0000 Author: imp Date: Fri Aug 4 16:33:36 2017 New Revision: 322056 URL: https://svnweb.freebsd.org/changeset/base/322056 Log: Move EFI fmtdev functionality to libefi This patch moves code necessary for the fmtdev functionality from loader to libefi, allowing other applications to make use of it Submitted by: Eric McCorkle Differential Revision: https://reviews.freebsd.org/D11862 Added: head/sys/boot/efi/libefi/devicename.c (contents, props changed) - copied, changed from r322055, head/sys/boot/efi/loader/devicename.c Deleted: head/sys/boot/efi/loader/devicename.c Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/loader_efi.h Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/include/efilib.h Fri Aug 4 16:33:36 2017 (r322056) @@ -64,6 +64,11 @@ pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *de void *efi_get_table(EFI_GUID *tbl); +int efi_getdev(void **vdev, const char *devspec, const char **path); +char *efi_fmtdev(void *vdev); +int efi_setcurrdev(struct env_var *ev, int flags, const void *value); + + int efi_register_handles(struct devsw *, EFI_HANDLE *, EFI_HANDLE *, int); EFI_HANDLE efi_find_handle(struct devsw *, int); int efi_handle_lookup(EFI_HANDLE, struct devsw **, int *, uint64_t *); Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/libefi/Makefile Fri Aug 4 16:33:36 2017 (r322056) @@ -12,7 +12,7 @@ INTERNALLIB= WARNS?= 2 SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \ - handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c + handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c Copied and modified: head/sys/boot/efi/libefi/devicename.c (from r322055, head/sys/boot/efi/loader/devicename.c) ============================================================================== --- head/sys/boot/efi/loader/devicename.c Fri Aug 4 15:57:10 2017 (r322055, copy source) +++ head/sys/boot/efi/libefi/devicename.c Fri Aug 4 16:33:36 2017 (r322056) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "loader_efi.h" - static int efi_parsedev(struct devdesc **, const char *, const char **); /* Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/loader/Makefile Fri Aug 4 16:33:36 2017 (r322056) @@ -16,7 +16,6 @@ SRCS= autoload.c \ bootinfo.c \ conf.c \ copy.c \ - devicename.c \ main.c \ self_reloc.c \ smbios.c \ Modified: head/sys/boot/efi/loader/loader_efi.h ============================================================================== --- head/sys/boot/efi/loader/loader_efi.h Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/loader/loader_efi.h Fri Aug 4 16:33:36 2017 (r322056) @@ -35,10 +35,6 @@ int efi_autoload(void); -int efi_getdev(void **vdev, const char *devspec, const char **path); -char *efi_fmtdev(void *vdev); -int efi_setcurrdev(struct env_var *ev, int flags, const void *value); - int efi_copy_init(void); ssize_t efi_copyin(const void *src, vm_offset_t dest, const size_t len);