Correctly set kernelname for kern.bootfile sysctl
Noticed by: gad Code stolen from: sparc64
This commit is contained in:
parent
a885159fea
commit
847b0d7551
@ -252,6 +252,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
|
||||
struct pcpu *pc;
|
||||
vm_offset_t end, off;
|
||||
void *kmdp;
|
||||
char *env;
|
||||
|
||||
end = 0;
|
||||
kmdp = NULL;
|
||||
@ -360,6 +361,15 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
|
||||
*/
|
||||
init_param2(physmem);
|
||||
|
||||
/*
|
||||
* Grab booted kernel's name
|
||||
*/
|
||||
env = getenv("kernelname");
|
||||
if (env != NULL) {
|
||||
strlcpy(kernelname, env, sizeof(kernelname));
|
||||
freeenv(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Finish setting up thread0.
|
||||
*/
|
||||
|
@ -252,6 +252,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
|
||||
struct pcpu *pc;
|
||||
vm_offset_t end, off;
|
||||
void *kmdp;
|
||||
char *env;
|
||||
|
||||
end = 0;
|
||||
kmdp = NULL;
|
||||
@ -360,6 +361,15 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
|
||||
*/
|
||||
init_param2(physmem);
|
||||
|
||||
/*
|
||||
* Grab booted kernel's name
|
||||
*/
|
||||
env = getenv("kernelname");
|
||||
if (env != NULL) {
|
||||
strlcpy(kernelname, env, sizeof(kernelname));
|
||||
freeenv(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Finish setting up thread0.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user