summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2012-09-24 17:13:33 +0000
committerhselasky <hselasky@FreeBSD.org>2012-09-24 17:13:33 +0000
commit2eed5d6e946b871405317c654c5b82e658751cf6 (patch)
tree76f05e4d77105cda2964b074b133fd41ebb2b27d /etc
parent17ea6066adcd37b8128ac12a30348905a4e19aa6 (diff)
downloadFreeBSD-src-2eed5d6e946b871405317c654c5b82e658751cf6.zip
FreeBSD-src-2eed5d6e946b871405317c654c5b82e658751cf6.tar.gz
Make sure moused is exiting as quick as possible after that the
umsX character device returns a read error. Update devd.conf rules to use "DEVFS" events which are generated after that the umsX character device node has been created/destroyed, and then there should be no need for moused to wait up to 10 seconds for umsX to be ready. Opening umsX should not fail except if the kernel is low on memory. In that case the user can replug the USB mouse or use "usbconfig" to reset the device. In case of USB mouse devices, moused should neither retry to open its character device, once the first read error has happened. This is an indication of device detach. MFC after: 1 week
Diffstat (limited to 'etc')
-rw-r--r--etc/devd.conf20
1 files changed, 14 insertions, 6 deletions
diff --git a/etc/devd.conf b/etc/devd.conf
index fa9ed98..d379ab0 100644
--- a/etc/devd.conf
+++ b/etc/devd.conf
@@ -115,14 +115,22 @@ detach 100 {
action "/etc/rc.d/syscons setkeyboard /dev/kbd0";
};
-attach 100 {
- device-name "ums[0-9]+";
- action "/etc/rc.d/moused quietstart $device-name";
+notify 100 {
+ match "system" "DEVFS";
+ match "subsystem" "CDEV";
+ match "type" "CREATE";
+ match "cdev" "ums[0-9]+";
+
+ action "/etc/rc.d/moused quietstart $cdev";
};
-detach 100 {
- device-name "ums[0-9]+";
- action "/etc/rc.d/moused stop $device-name";
+notify 100 {
+ match "system" "DEVFS";
+ match "subsystem" "CDEV";
+ match "type" "DESTROY";
+ match "cdev" "ums[0-9]+";
+
+ action "/etc/rc.d/moused stop $cdev";
};
# Firmware download into the ActiveWire board. After the firmware download is
OpenPOWER on IntegriCloud