Author: mhorne
Date: Sat Aug 15 16:15:34 2020
New Revision: 364256
URL: https://svnweb.freebsd.org/changeset/base/364256
Log:
RISC-V: copy kernelname from the environment
This is allows kern.bootfile to report the correct value.
Modified:
head/sys/riscv/riscv/machdep.c
Modified: head/sys/riscv/riscv/machdep.c
==============================================================================
--- head/sys/riscv/riscv/machdep.c Sat Aug 15 15:06:39 2020
(r364255)
+++ head/sys/riscv/riscv/machdep.c Sat Aug 15 16:15:34 2020
(r364256)
@@ -861,6 +861,7 @@ initriscv(struct riscv_bootparams *rvbp)
phandle_t chosen;
uint32_t hart;
#endif
+ char *env;
TSRAW(&thread0, TS_ENTER, __func__, NULL);
@@ -954,6 +955,10 @@ initriscv(struct riscv_bootparams *rvbp)
mutex_init();
init_param2(physmem);
kdb_init();
+
+ env = kern_getenv("kernelname");
+ if (env != NULL)
+ strlcpy(kernelname, env, sizeof(kernelname));
if (boothowto & RB_VERBOSE)
physmem_print_tables();
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"