Make sure kern_envp is never NULL. If we don't get a pointer to

the environment from the loader, use the static environment.
This commit is contained in:
Marcel Moolenaar 2006-11-03 04:06:17 +00:00
parent 11f8548a0d
commit 5910f6cc85

View file

@ -586,10 +586,11 @@ ia64_init(void)
preload_metadata = (caddr_t)bootinfo.bi_modulep;
else
metadata_missing = 1;
if (envmode == 1)
kern_envp = static_env;
else
if (envmode == 0 && bootinfo.bi_envp)
kern_envp = (caddr_t)bootinfo.bi_envp;
else
kern_envp = static_env;
/*
* Look at arguments passed to us and compute boothowto.