aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 01:07:41 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 01:07:41 +0000
commit5d0c5750bb19212c8ecfb9660956611baf6aa861 (patch)
treefd468f1fb4850cb4dc66d5af2a0ed4025ca85bc3 /hw
parent446ab1284e0648eb9e2bfd08edb769bcd22dccb2 (diff)
downloadqemu-5d0c5750bb19212c8ecfb9660956611baf6aa861.zip
qemu-5d0c5750bb19212c8ecfb9660956611baf6aa861.tar.gz
qemu-5d0c5750bb19212c8ecfb9660956611baf6aa861.tar.bz2
usb: Support for removing device by host addr, improved auto filter syntax (Max Krasnyansky)
This patch adds support for removing USB devices by host address. Which is usefull for things like libvirtd because there is no easy way to find guest USB address of the host device. In other words you can now do: usb_add host:3.5 ... usb_del host:3.5 Before the patch 'usb_del' did not support 'host:' notation. ---- Syntax for specifying auto connect filters has been improved. Old syntax was host:bus.dev host:pid:vid New syntax is host:auto:bus.dev[:pid:vid] In both the cases any attribute can be set to "*". New syntax is more flexible and lets you do things like host:3.*:5533:* /* grab any device on bus 3 with vendor id 5533 */ It's now possible to remove auto filters. For example: usb_del host:auto:3.*:5533:* Active filters are printed after all host devices in 'info usb' output. Which now looks like this: Device 1.1, speed 480 Mb/s Hub: USB device 1d6b:0002, EHCI Host Controller Device 1.4, speed 480 Mb/s Class 00: USB device 1058:0704, External HDD Auto filters: Device 3.* ID *:* Signed-off-by: Max Krasnyansky <maxk@kernel.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5205 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/usb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb.h b/hw/usb.h
index 997e69f..1a353bb 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -240,6 +240,7 @@ USBDevice *usb_hub_init(int nb_ports);
/* usb-linux.c */
USBDevice *usb_host_device_open(const char *devname);
+int usb_host_device_close(const char *devname);
void usb_host_info(void);
/* usb-hid.c */