dom0+vm/qvm-usb: changed the structure of XS pathes
This commit is contained in:
parent
f150d5697f
commit
4c4889ec1a
@ -9,15 +9,17 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
# FIXME: Ignore USB hubs.
|
# FIXME: Ignore USB hubs.
|
||||||
[ "$DEVTYPE" = "usb_device" ] || exit 0
|
[ "$DEVNUM" = "001" ] && exit 0
|
||||||
|
|
||||||
NAME="${ID_VENDOR_ID}_${ID_MODEL_ID}"
|
NAME="${BUSNUM}/${DEVNUM}"
|
||||||
DESC="${NAME} ${ID_SERIAL}"
|
# FIXME: For some devices (my Cherry keyboard) ID_SERIAL does not
|
||||||
|
# contain proper human-readable name, should find better method to
|
||||||
|
# build devide description.
|
||||||
|
#DESC=`python -c "dev='%d-%d' % (int('${BUSNUM}'.lstrip('0')), (int('${DEVNUM}'.lstrip('0'))-1)); from xen.util import vusb_util; print vusb_util.get_usbdevice_info(dev);"`
|
||||||
|
DESC="${ID_VENDOR_ID}:${ID_MODEL_ID} ${ID_SERIAL}"
|
||||||
XS_KEY="qubes-usb-devices/$NAME"
|
XS_KEY="qubes-usb-devices/$NAME"
|
||||||
|
|
||||||
xenstore-write "$XS_KEY/desc" "$DESC"
|
xenstore-write "$XS_KEY/desc" "$DESC"
|
||||||
#xenstore-write "$XS_KEY/_devname" "$DEVNAME"
|
|
||||||
#xenstore-write "$XS_KEY/_devtype" "$DEVTYPE"
|
|
||||||
|
|
||||||
# Make sure PVUSB backend driver is loaded.
|
# Make sure PVUSB backend driver is loaded.
|
||||||
/sbin/modprobe xen-usbback 2> /dev/null || /sbin/modprobe usbbk
|
/sbin/modprobe xen-usbback 2> /dev/null || /sbin/modprobe usbbk
|
||||||
|
Loading…
Reference in New Issue
Block a user