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
This commit is contained in:
Warner Losh 2017-08-04 16:33:36 +00:00
parent 019c1a0111
commit 9990efd2e2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=322056
5 changed files with 6 additions and 8 deletions

View File

@ -64,6 +64,11 @@ pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev);
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 *);

View File

@ -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

View File

@ -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 **);
/*

View File

@ -16,7 +16,6 @@ SRCS= autoload.c \
bootinfo.c \
conf.c \
copy.c \
devicename.c \
main.c \
self_reloc.c \
smbios.c \

View File

@ -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);