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;
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to