Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Add the ability to set an alternate cnmagic in the ...
details: https://anonhg.NetBSD.org/src/rev/f1471698f3f3
branches: trunk
changeset: 954614:f1471698f3f3
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Sep 07 03:50:41 2020 +0000
description:
Add the ability to set an alternate cnmagic in the kernel config
file, e.g.:
options CNMAGIC="\"+++++\""
diffstat:
sys/kern/files.kern | 4 +++-
sys/kern/init_main.c | 8 ++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diffs (48 lines):
diff -r 7f5621440c44 -r f1471698f3f3 sys/kern/files.kern
--- a/sys/kern/files.kern Mon Sep 07 03:36:11 2020 +0000
+++ b/sys/kern/files.kern Mon Sep 07 03:50:41 2020 +0000
@@ -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 @@
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
diff -r 7f5621440c44 -r f1471698f3f3 sys/kern/init_main.c
--- a/sys/kern/init_main.c Mon Sep 07 03:36:11 2020 +0000
+++ b/sys/kern/init_main.c Mon Sep 07 03:50:41 2020 +0000
@@ -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 @@
* in case of early panic or other messages.
*/
consinit();
+#ifdef CNMAGIC
+ cn_set_magic(CNMAGIC);
+#endif
kernel_lock_init();
once_init();
Home |
Main Index |
Thread Index |
Old Index