Page MenuHomeFreeBSD

D26271.diff
No OneTemporary

D26271.diff

Index: head/sys/kern/kern_environment.c
===================================================================
--- head/sys/kern/kern_environment.c
+++ head/sys/kern/kern_environment.c
@@ -253,7 +253,6 @@
void
init_static_kenv(char *buf, size_t len)
{
- char *eval;
KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized"));
/*
@@ -301,20 +300,17 @@
* if the static environment has disabled the loader environment.
*/
kern_envp = static_env;
- eval = kern_getenv("loader_env.disabled");
- if (eval == NULL || strcmp(eval, "1") != 0) {
+ if (!getenv_is_true("loader_env.disabled")) {
md_envp = buf;
md_env_len = len;
md_env_pos = 0;
- eval = kern_getenv("static_env.disabled");
- if (eval != NULL && strcmp(eval, "1") == 0) {
+ if (getenv_is_true("static_env.disabled")) {
kern_envp[0] = '\0';
kern_envp[1] = '\0';
}
}
- eval = kern_getenv("static_hints.disabled");
- if (eval != NULL && strcmp(eval, "1") == 0) {
+ if (getenv_is_true("static_hints.disabled")) {
static_hints[0] = '\0';
static_hints[1] = '\0';
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 11:19 AM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14760481
Default Alt Text
D26271.diff (1 KB)

Event Timeline