aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2024-04-30 20:07:30 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2024-04-30 20:23:47 +0000
commit2cb49090114108d594195b9b32c762391340484c (patch)
tree38b98ec3cde5479d0d4641ba7d1944d17d685de2 /sys/sys
parent21aba396551e29808fa56a6d4fab17e871c3524f (diff)
downloadsrc-2cb49090114108d594195b9b32c762391340484c.tar.gz
src-2cb49090114108d594195b9b32c762391340484c.zip
cons: Add boot option to mute boot messages after banner
This is useful for embedded systems, where it provides feedback that the kernel has booted, but avoids printing the probe messages. If both mutemsgs and verbose are set, verbose cancels the mute. Additionally, this unmutes the console on panic, so a user can see what happened leading up to the panic. Obtained from: Juniper Networks, Inc.
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/cons.h2
-rw-r--r--sys/sys/reboot.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index 191d77598b77..78df26858376 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -94,6 +94,8 @@ struct consdev {
#ifdef _KERNEL
+extern int cn_mute;
+
extern struct msgbuf consmsgbuf; /* Message buffer for constty. */
extern struct tty *constty; /* Temporary virtual console. */
diff --git a/sys/sys/reboot.h b/sys/sys/reboot.h
index 78572365e158..26e78632fb2c 100644
--- a/sys/sys/reboot.h
+++ b/sys/sys/reboot.h
@@ -60,6 +60,7 @@
#define RB_PAUSE 0x100000 /* pause after each output line during probe */
#define RB_REROOT 0x200000 /* unmount the rootfs and mount it again */
#define RB_POWERCYCLE 0x400000 /* Power cycle if possible */
+#define RB_MUTEMSGS 0x800000 /* start up with console muted after banner */
#define RB_PROBE 0x10000000 /* Probe multiple consoles */
#define RB_MULTIPLE 0x20000000 /* use multiple consoles */