summaryrefslogtreecommitdiff
path: root/tools/hal-probe-vmmouse.in
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@fido2.homeip.net>2008-10-23 21:54:44 -0700
committerPhilip Langdale <philipl@fido2.homeip.net>2008-10-23 21:54:44 -0700
commiteb03e96c1974a3fbe1c48c56974ff32bc886c8f7 (patch)
treea0a671aa85dc18d54dcda82ab738ac3e332888a0 /tools/hal-probe-vmmouse.in
parent223afd09500672a7fe8a1ab5fc221001863a8bec (diff)
Add HAL integration to support input hot plug.
* vmmouse_detect: A simple program that detects whether a vmmouse device is present. * hal-probe-vmmouse: A HAL callout script that uses vmmouse_detect and overrides input.x11_driver. * 11-x11-vmmouse.fdi: fdi descriptor that adds the callout for PS/2 mice. Additional 'configure' variables have been added to allow for overriding HAL paths, although this shouldn't usually be necessary.
Diffstat (limited to 'tools/hal-probe-vmmouse.in')
-rwxr-xr-xtools/hal-probe-vmmouse.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/hal-probe-vmmouse.in b/tools/hal-probe-vmmouse.in
new file mode 100755
index 0000000..67e6149
--- /dev/null
+++ b/tools/hal-probe-vmmouse.in
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+[ -x __HAL_BIN_PREFIX__/hal-set-property ] || exit 0
+[ -x __BIN_PREFIX__/vmmouse_detect ] || exit 0
+
+__BIN_PREFIX__/vmmouse_detect
+if [ $? -eq 0 ]; then
+ __HAL_BIN_PREFIX__/hal-set-property --direct --udi "$UDI" --key input.x11_driver --string "vmmouse"
+fi
+