From 2df6f852fc3c69c7d38c6aad7fd80fc488e7ed82 Mon Sep 17 00:00:00 2001 From: emax Date: Wed, 1 Mar 2006 18:34:48 +0000 Subject: [PATCH] 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 --- share/man/man4/kbdmux.4 | 4 ++++ sys/dev/kbdmux/kbdmux.c | 4 ++++ sys/modules/kbdmux/Makefile | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/share/man/man4/kbdmux.4 b/share/man/man4/kbdmux.4 index 447c8b03a75d..9b63f424a25a 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 27473b1d8f93..3a0177bab270 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -34,6 +34,7 @@ #include "opt_kbd.h" #include +#include #include #include #include @@ -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 9ac6de35792f..2d64ddf7f5fb 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: