Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2014 22:23:10 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267625 - head/sys/dev/syscons
Message-ID:  <201406182223.s5IMNAb1005729@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406182223.s5IMNAb1005729>