Module Name: src Committed By: thorpej Date: Mon Sep 7 03:50:41 UTC 2020
Modified Files: src/sys/kern: files.kern init_main.c Log Message: Add the ability to set an alternate cnmagic in the kernel config file, e.g.: options CNMAGIC="\"+++++\"" To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/kern/files.kern cvs rdiff -u -r1.529 -r1.530 src/sys/kern/init_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/files.kern diff -u src/sys/kern/files.kern:1.51 src/sys/kern/files.kern:1.52 --- src/sys/kern/files.kern:1.51 Fri Aug 14 00:53:16 2020 +++ src/sys/kern/files.kern Mon Sep 7 03:50:41 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.kern,v 1.51 2020/08/14 00:53:16 riastradh Exp $ +# $NetBSD: files.kern,v 1.52 2020/09/07 03:50:41 thorpej Exp $ # # kernel sources @@ -7,6 +7,8 @@ define kern: cprng_fast, machdep, uvm defflag opt_kern.h KERN defflag opt_script.h SETUIDSCRIPTS FDSCRIPTS defflag KASLR +defparam opt_cnmagic.h CNMAGIC + file conf/debugsyms.c kern file conf/param.c kern file kern/bufq_disksort.c bufq_disksort Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.529 src/sys/kern/init_main.c:1.530 --- src/sys/kern/init_main.c:1.529 Thu Aug 27 14:01:36 2020 +++ src/sys/kern/init_main.c Mon Sep 7 03:50:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.529 2020/08/27 14:01:36 riastradh Exp $ */ +/* $NetBSD: init_main.c,v 1.530 2020/09/07 03:50:41 thorpej Exp $ */ /*- * Copyright (c) 2008, 2009, 2019 The NetBSD Foundation, Inc. @@ -97,8 +97,9 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.529 2020/08/27 14:01:36 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.530 2020/09/07 03:50:41 thorpej Exp $"); +#include "opt_cnmagic.h" #include "opt_ddb.h" #include "opt_inet.h" #include "opt_ipsec.h" @@ -295,6 +296,9 @@ main(void) * in case of early panic or other messages. */ consinit(); +#ifdef CNMAGIC + cn_set_magic(CNMAGIC); +#endif kernel_lock_init(); once_init();