svn commit: r322056 - in head/sys/boot/efi: include libefi loader
Warner Losh
imp at FreeBSD.org
Fri Aug 4 16:33:38 UTC 2017
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 <efi.h>
#include <efilib.h>
-#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);
More information about the svn-src-all
mailing list