Fix recently introduced bugs in -usbdevice host
commit0745eb1e4336bf665a911754d18ddd63794b352d
authorMarkus Armbruster <armbru@redhat.com>
Fri, 27 Nov 2009 12:05:53 +0000 (27 13:05 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 21:25:58 +0000 (3 15:25 -0600)
tree24589140448c346f39cddd526b8ad164c4e31327
parent21eb3a2ba3af9aa7c9c46d91d7be0fbdfb393b0d
Fix recently introduced bugs in -usbdevice host

Commit 26a9e82a has the following flaws:

* It enabled DEBUG.

* It referenced two properties by the wrong name in
  usb_host_device_open(), which crashes with "qdev_prop_set: property
  "USB Host Device.bus" not found".

* It broke "-usbdevice host:auto:..." by calling parse_filter()
  incorrectly.

* It broke parsing of "-usbdevice host:BUS.ADDR" and "-usbdevice
  host:VID:PRID" with a trivial pasto.

* It broke wildcards in "-usbdevice host:auto:...".  Before, the four
  filter components were stored as int, and the wildcard was encoded
  as -1.  The faulty commit changed storage to uint32_t, and the
  wildcard encoding to 0.  But it failed to update parse_filter()
  accordingly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-linux.c