diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/aim/machdep.c | 10 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index f9512b9..1588796 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -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; @@ -361,6 +362,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. */ thread0.td_kstack = kstack0; diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index f9512b9..1588796 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -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; @@ -361,6 +362,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. */ thread0.td_kstack = kstack0; |