usb: Add QOM property "attached".
commit1e351dc373c96a6df4107db3f780a4c89a791afd
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 15 Jun 2016 09:46:57 +0000 (15 11:46 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 22 Jun 2016 10:53:26 +0000 (22 12:53 +0200)
tree6a3e1eda4c32e6f38b2ad9e677d04cb7d9191692
parenteb19d2b9d15bf68d27704e8727772924681644b8
usb: Add QOM property "attached".

USB devices in attached state are visible to the guest.  This patch adds
a QOM property for this.  Write access is opt-in per device.  Some
devices manage attached state automatically (usb-host, usb-serial,
usb-redir), so we can't enable write access universally but have to do
it on a case by case base.  So far, no device opts in.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1465984019-28963-4-git-send-email-kraxel@redhat.com

[ minor codestyle fix ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/bus.c
include/hw/usb.h