Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 2017 17:32:09 +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: r323062 - head/sys/boot/efi/libefi
Message-ID:  <201708311732.v7VHW9wq037192@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Aug 31 17:32:09 2017
New Revision: 323062
URL: https://svnweb.freebsd.org/changeset/base/323062

Log:
  Make efichar.c routines available to libefi.
  
  Make efichar.c routines available to libefi as well as
  libefivar. Define LIBEFI when building so we can conditionally include
  stand.h vs the normal userland stuff.

Modified:
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/libefi/efichar.c

Modified: head/sys/boot/efi/libefi/Makefile
==============================================================================
--- head/sys/boot/efi/libefi/Makefile	Thu Aug 31 17:22:35 2017	(r323061)
+++ head/sys/boot/efi/libefi/Makefile	Thu Aug 31 17:32:09 2017	(r323062)
@@ -11,7 +11,7 @@ LIB=	efi
 INTERNALLIB=
 WARNS?=	2
 
-SRCS=	delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
+SRCS=	delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \
 	handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
@@ -55,5 +55,7 @@ CFLAGS+= ${FORMAT_EXTENSIONS}
 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
 CFLAGS+= -DTERM_EMU
 .endif
+
+CFLAGS+= -DLIBEFI
 
 .include <bsd.lib.mk>

Modified: head/sys/boot/efi/libefi/efichar.c
==============================================================================
--- head/sys/boot/efi/libefi/efichar.c	Thu Aug 31 17:22:35 2017	(r323061)
+++ head/sys/boot/efi/libefi/efichar.c	Thu Aug 31 17:32:09 2017	(r323062)
@@ -29,10 +29,14 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/types.h>
 #include <errno.h>
+#ifdef LIBEFI
+#include <stand.h>
+#else
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#endif
 #include <sys/efi.h>
 #include <machine/efi.h>
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708311732.v7VHW9wq037192>