From 6fe9132e0a765fdba0fafc2bf5fdee3b424df1df Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 23 Oct 2012 05:44:37 +0200 Subject: [PATCH] dom0+vm/qvm-usb: improve USB hubs detection This method filter out also "rate matching hub", which is device 2. --- misc/usb_add_change | 2 +- misc/usb_remove | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/usb_add_change b/misc/usb_add_change index 4440475..b2b5e6a 100755 --- a/misc/usb_add_change +++ b/misc/usb_add_change @@ -9,7 +9,7 @@ ## # FIXME: Ignore USB hubs and other wierd devices (see also in usb_remove). -[ "$DEVNUM" = "001" ] && exit 0 +[ "`echo $TYPE | cut -f1 -d/`" = "9" ] && exit 0 [ "$DEVTYPE" != "usb_device" ] && exit 0 # xenstore doesn't allow dot in key name diff --git a/misc/usb_remove b/misc/usb_remove index f7f33ed..aa562fa 100755 --- a/misc/usb_remove +++ b/misc/usb_remove @@ -1,7 +1,7 @@ #!/bin/sh # FIXME: Ignore USB hubs. -[ "$DEVNUM" = "001" ] && exit 0 +[ "`echo $TYPE | cut -f1 -d/`" = "9" ] && exit 0 NAME=`basename ${DEVPATH} | tr . _` XS_KEY="qubes-usb-devices/$NAME"