summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2006-03-01 18:34:48 +0000
committeremax <emax@FreeBSD.org>2006-03-01 18:34:48 +0000
commit2df6f852fc3c69c7d38c6aad7fd80fc488e7ed82 (patch)
tree48d8f4bf613af75054c83ef4b0890ff6a307d456
parent979dd3001bd13ccce6ecb7d75436a820c7554125 (diff)
downloadFreeBSD-src-2df6f852fc3c69c7d38c6aad7fd80fc488e7ed82.zip
FreeBSD-src-2df6f852fc3c69c7d38c6aad7fd80fc488e7ed82.tar.gz
Provide ability to disable kbdmux(4) with the hint.kbdmux.0.disabled="1" hint.
Document hint in the kbdmux(4) man page. Requested by: scottl MFC after: 1 day
-rw-r--r--share/man/man4/kbdmux.44
-rw-r--r--sys/dev/kbdmux/kbdmux.c4
-rw-r--r--sys/modules/kbdmux/Makefile2
3 files changed, 9 insertions, 1 deletions
diff --git a/share/man/man4/kbdmux.4 b/share/man/man4/kbdmux.4
index 447c8b0..9b63f42 100644
--- a/share/man/man4/kbdmux.4
+++ b/share/man/man4/kbdmux.4
@@ -9,6 +9,10 @@
.Nd "keyboard multiplexer"
.Sh SYNOPSIS
.Cd "device kbdmux"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.kbdmux.0.disabled="1"
.Sh DESCRIPTION
The
.Nm
diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c
index 27473b1..3a0177b 100644
--- a/sys/dev/kbdmux/kbdmux.c
+++ b/sys/dev/kbdmux/kbdmux.c
@@ -34,6 +34,7 @@
#include "opt_kbd.h"
#include <sys/param.h>
+#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/consio.h>
#include <sys/fcntl.h>
@@ -368,6 +369,9 @@ kbdmux_configure(int flags)
static int
kbdmux_probe(int unit, void *arg, int flags)
{
+ if (resource_disabled(KEYBOARD_NAME, unit))
+ return (ENXIO);
+
return (0);
}
diff --git a/sys/modules/kbdmux/Makefile b/sys/modules/kbdmux/Makefile
index 9ac6de3..2d64ddf 100644
--- a/sys/modules/kbdmux/Makefile
+++ b/sys/modules/kbdmux/Makefile
@@ -4,7 +4,7 @@
.PATH: ${.CURDIR}/../../dev/kbdmux
KMOD= kbdmux
-SRCS= kbdmux.c opt_kbd.h
+SRCS= kbdmux.c opt_kbd.h bus_if.h device_if.h
.if !defined(KERNBUILDDIR)
opt_kbd.h:
OpenPOWER on IntegriCloud