Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2017 06:39:55 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316076 - head/sys/boot/common
Message-ID:  <201703280639.v2S6dtx9019521@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue Mar 28 06:39:54 2017
New Revision: 316076
URL: https://svnweb.freebsd.org/changeset/base/316076

Log:
  sys/boot/common: Make geli(4) support optional in MI sources
  
  This saves a negligible amount of memory for non-geli enabled
  bootloaders.
  
  MFC after:	1 week
  Sponsored by:	Dell EMC Isilon

Modified:
  head/sys/boot/common/Makefile.inc
  head/sys/boot/common/module.c

Modified: head/sys/boot/common/Makefile.inc
==============================================================================
--- head/sys/boot/common/Makefile.inc	Tue Mar 28 06:13:21 2017	(r316075)
+++ head/sys/boot/common/Makefile.inc	Tue Mar 28 06:39:54 2017	(r316076)
@@ -37,6 +37,9 @@ CFLAGS+= -DLOADER_GPT_SUPPORT
 CFLAGS+= -DLOADER_MBR_SUPPORT
 .endif
 .endif
+.if !defined(LOADER_NO_GELI_SUPPORT)
+CFLAGS+= -DLOADER_GELI_SUPPORT
+.endif
 
 .if defined(HAVE_BCACHE)
 SRCS+=  bcache.c

Modified: head/sys/boot/common/module.c
==============================================================================
--- head/sys/boot/common/module.c	Tue Mar 28 06:13:21 2017	(r316075)
+++ head/sys/boot/common/module.c	Tue Mar 28 06:39:54 2017	(r316076)
@@ -183,6 +183,7 @@ command_load(int argc, char *argv[])
     return (error == 0 ? CMD_OK : CMD_CRIT);
 }
 
+#ifdef LOADER_GELI_SUPPORT
 COMMAND_SET(load_geli, "load_geli", "load a geli key", command_load_geli);
 
 static int
@@ -221,6 +222,7 @@ command_load_geli(int argc, char *argv[]
     sprintf(typestr, "%s:geli_keyfile%d", argv[1], num);
     return (file_loadraw(argv[2], typestr, 1) ? CMD_OK : CMD_ERROR);
 }
+#endif
 
 void
 unload(void)



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