summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/sysmouse.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-06-27 17:50:33 +0000
committeremaste <emaste@FreeBSD.org>2014-06-27 17:50:33 +0000
commit2b75e7bbda9839bf493b5afbf7e16c0671f0c5ff (patch)
tree8d5bf911ab86505463544aa8651ae81db12bcb06 /sys/dev/syscons/sysmouse.c
parent325c7f4782bf4701164925ba58bd0aacb84b5630 (diff)
downloadFreeBSD-src-2b75e7bbda9839bf493b5afbf7e16c0671f0c5ff.zip
FreeBSD-src-2b75e7bbda9839bf493b5afbf7e16c0671f0c5ff.tar.gz
Use a common tunable to choose between vt(4)/sc(4)
With this change and previous work from ray@ it will be possible to put both in GENERIC, and have one enabled by default, but allow the other to be selected via the loader. (The previous implementation had separate kern.vt.disable and hw.syscons.disable tunables, and would panic if both drivers were compiled in and neither was explicitly disabled.) MFC after: 1 week Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/syscons/sysmouse.c')
-rw-r--r--sys/dev/syscons/sysmouse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index f2163fc..e668497 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/tty.h>
#include <sys/ttydefaults.h>
#include <sys/kernel.h>
+#include <sys/cons.h>
#include <sys/consio.h>
#include <sys/mouse.h>
@@ -165,7 +166,7 @@ static struct ttydevsw smdev_ttydevsw = {
static void
sm_attach_mouse(void *unused)
{
- if (getenv("hw.syscons.disable"))
+ if (!vty_enabled(VTY_SC))
return;
sysmouse_tty = tty_alloc(&smdev_ttydevsw, NULL);
tty_makedev(sysmouse_tty, NULL, "sysmouse");
OpenPOWER on IntegriCloud