svn commit: r267625 - head/sys/dev/syscons
Aleksandr Rybalko
ray at FreeBSD.org
Wed Jun 18 22:23:11 UTC 2014
Author: ray
Date: Wed Jun 18 22:23:10 2014
New Revision: 267625
URL: http://svnweb.freebsd.org/changeset/base/267625
Log:
Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/dev/syscons/syscons.c
head/sys/dev/syscons/sysmouse.c
Modified: head/sys/dev/syscons/syscons.c
==============================================================================
--- head/sys/dev/syscons/syscons.c Wed Jun 18 22:18:58 2014 (r267624)
+++ head/sys/dev/syscons/syscons.c Wed Jun 18 22:23:10 2014 (r267625)
@@ -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 */
Modified: head/sys/dev/syscons/sysmouse.c
==============================================================================
--- head/sys/dev/syscons/sysmouse.c Wed Jun 18 22:18:58 2014 (r267624)
+++ head/sys/dev/syscons/sysmouse.c Wed Jun 18 22:23:10 2014 (r267625)
@@ -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");
}
More information about the svn-src-head
mailing list