Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Nov 2017 16:19:00 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326280 - head/sys/arm64/arm64
Message-ID:  <201711271619.vARGJ0Qe028701@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Mon Nov 27 16:19:00 2017
New Revision: 326280
URL: https://svnweb.freebsd.org/changeset/base/326280

Log:
  Set the kernel file name so the kern.bootfile sysctl is set. This allows
  for the creation of kernel.old when running installkernel.
  
  MFC after:	1 week
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/arm64/arm64/machdep.c

Modified: head/sys/arm64/arm64/machdep.c
==============================================================================
--- head/sys/arm64/arm64/machdep.c	Mon Nov 27 15:49:00 2017	(r326279)
+++ head/sys/arm64/arm64/machdep.c	Mon Nov 27 16:19:00 2017	(r326280)
@@ -1017,6 +1017,7 @@ initarm(struct arm64_bootparams *abp)
 {
 	struct efi_map_header *efihdr;
 	struct pcpu *pcpup;
+	char *env;
 #ifdef FDT
 	struct mem_region mem_regions[FDT_MEM_REGIONS];
 	int mem_regions_sz;
@@ -1116,6 +1117,10 @@ initarm(struct arm64_bootparams *abp)
 	dbg_init();
 	kdb_init();
 	pan_enable();
+
+	env = kern_getenv("kernelname");
+	if (env != NULL)
+		strlcpy(kernelname, env, sizeof(kernelname));
 
 	early_boot = 0;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711271619.vARGJ0Qe028701>