diff options
author | ray <ray@FreeBSD.org> | 2014-06-18 22:23:10 +0000 |
---|---|---|
committer | ray <ray@FreeBSD.org> | 2014-06-18 22:23:10 +0000 |
commit | 2da67a405f1856d6effff8df70070c98c5a24878 (patch) | |
tree | aae4b84a5d7c6c80ee931bbdc032ccbbf2682d94 | |
parent | 9722d2a95d7eb4035bac0f1c09957c18ad48cf98 (diff) | |
download | FreeBSD-src-2da67a405f1856d6effff8df70070c98c5a24878.zip FreeBSD-src-2da67a405f1856d6effff8df70070c98c5a24878.tar.gz |
Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | sys/dev/syscons/syscons.c | 5 | ||||
-rw-r--r-- | sys/dev/syscons/sysmouse.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index b44dd53..1160f73 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -1589,6 +1589,11 @@ sc_cnprobe(struct consdev *cp) int unit; int flags; + if (getenv("hw.syscons.disable")) { + cp->cn_pri = CN_DEAD; + return; + } + cp->cn_pri = sc_get_cons_priority(&unit, &flags); /* a video card is always required */ diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index c58e9ae..f2163fc 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -165,6 +165,8 @@ static struct ttydevsw smdev_ttydevsw = { static void sm_attach_mouse(void *unused) { + if (getenv("hw.syscons.disable")) + return; sysmouse_tty = tty_alloc(&smdev_ttydevsw, NULL); tty_makedev(sysmouse_tty, NULL, "sysmouse"); } |