aboutsummaryrefslogtreecommitdiff
path: root/stand/common/metadata.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-06-09 15:10:39 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-06-09 15:10:39 +0000
commit593e2c6ecec705b9fe0f6dcc366b5c1def7a1a7a (patch)
tree3b1dd02d61e87abc4867ce3c1339596052217f04 /stand/common/metadata.c
parent4a0f8b339eca10c1eb62bd21474d818ec877e8a5 (diff)
downloadsrc-593e2c6ecec705b9fe0f6dcc366b5c1def7a1a7a.tar.gz
src-593e2c6ecec705b9fe0f6dcc366b5c1def7a1a7a.zip
stand: Consolidate checking for boot flags driven by environment vars
e.g. boot_mute, boot_single, boot_verbose, and friends; we checked for these in multiple places, consolidate into common/ and allow a setting of "NO" for any of these to turn them off. This allows systems with multiple loader.conf(5) or loader.conf(5) overlay systems to easily turn off variables in later processed files by setting it to NO. Reported by: Nick Wolff @ iXsystems Reviewed by: imp
Notes
Notes: svn path=/head/; revision=334882
Diffstat (limited to 'stand/common/metadata.c')
-rw-r--r--stand/common/metadata.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/stand/common/metadata.c b/stand/common/metadata.c
index 7be125c00257..71c33eadb520 100644
--- a/stand/common/metadata.c
+++ b/stand/common/metadata.c
@@ -31,9 +31,7 @@ __FBSDID("$FreeBSD$");
#include <stand.h>
#include <sys/param.h>
-#include <sys/reboot.h>
#include <sys/linker.h>
-#include <sys/boot.h>
#if defined(LOADER_FDT_SUPPORT)
#include <fdt_platform.h>
#endif
@@ -100,7 +98,6 @@ md_getboothowto(char *kargs)
char *cp;
int howto;
int active;
- int i;
/* Parse kargs */
howto = 0;
@@ -153,10 +150,7 @@ md_getboothowto(char *kargs)
}
}
- /* get equivalents from the environment */
- for (i = 0; howto_names[i].ev != NULL; i++)
- if (getenv(howto_names[i].ev) != NULL)
- howto |= howto_names[i].mask;
+ howto |= bootenv_flags();
#if defined(__sparc64__)
if (md_bootserial() != -1)
howto |= RB_SERIAL;