From c8569283144295600f1775da73b92029f93386fa Mon Sep 17 00:00:00 2001 From: Alexandre Bezroutchko Date: Mon, 8 Oct 2012 00:43:01 +0200 Subject: [PATCH] dom0+vm/qvm-usb: changed XS path naming scheme again --- misc/usb_add_change | 5 +++-- misc/usb_remove | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/misc/usb_add_change b/misc/usb_add_change index e01f3620..56cde287 100755 --- a/misc/usb_add_change +++ b/misc/usb_add_change @@ -8,10 +8,11 @@ ## running in dom0. ## -# FIXME: Ignore USB hubs. +# FIXME: Ignore USB hubs and other wierd devices. [ "$DEVNUM" = "001" ] && exit 0 +[ "$DEVTYPE" != "usb_device" ] && exit 0 -NAME="${BUSNUM}/${DEVNUM}" +NAME=`basename ${DEVPATH}` # FIXME: For some devices (my Cherry keyboard) ID_SERIAL does not # contain proper human-readable name, should find better method to # build devide description. diff --git a/misc/usb_remove b/misc/usb_remove index 5598849b..926dc6fc 100755 --- a/misc/usb_remove +++ b/misc/usb_remove @@ -3,7 +3,7 @@ # FIXME: Ignore USB hubs. [ "$DEVNUM" = "001" ] && exit 0 -NAME="${BUSNUM}/${DEVNUM}" +NAME=`basename ${DEVPATH}` XS_KEY="qubes-usb-devices/$NAME" xenstore-rm "$XS_KEY"