Date: Sat, 15 Aug 2020 16:15:34 +0000 (UTC) From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364256 - head/sys/riscv/riscv Message-ID: <202008151615.07FGFY5T090450@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008151615.07FGFY5T090450>