From 2b75e7bbda9839bf493b5afbf7e16c0671f0c5ff Mon Sep 17 00:00:00 2001 From: emaste Date: Fri, 27 Jun 2014 17:50:33 +0000 Subject: 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 --- sys/dev/syscons/sysmouse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/dev/syscons/sysmouse.c') 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 #include #include +#include #include #include @@ -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"); -- cgit v1.1