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
This commit is contained in:
Enji Cooper 2017-03-28 06:39:54 +00:00
parent a3cfc94601
commit 75cc519f34
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316076
2 changed files with 5 additions and 0 deletions

View file

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

View file

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