dom+vm/qvm-usb: improve handling devices like "2-1.4"

xenstore doesn't allow '.' in key name, so translate it to '_'
This commit is contained in:
Marek Marczykowski 2012-10-23 05:42:39 +02:00
parent d497bb8054
commit 158ac0bd6a
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,8 @@
[ "$DEVNUM" = "001" ] && exit 0
[ "$DEVTYPE" != "usb_device" ] && exit 0
NAME=`basename ${DEVPATH}`
# xenstore doesn't allow dot in key name
NAME=`basename ${DEVPATH} | tr . _`
# FIXME: For some devices (my Cherry keyboard) ID_SERIAL does not
# contain proper human-readable name, should find better method to
# build devide description.

View File

@ -3,7 +3,7 @@
# FIXME: Ignore USB hubs.
[ "$DEVNUM" = "001" ] && exit 0
NAME=`basename ${DEVPATH}`
NAME=`basename ${DEVPATH} | tr . _`
XS_KEY="qubes-usb-devices/$NAME"
xenstore-rm "$XS_KEY"