aboutsummaryrefslogtreecommitdiff
path: root/include/hw/usb.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-06-15 11:46:57 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-06-22 12:53:26 +0200
commit1e351dc373c96a6df4107db3f780a4c89a791afd (patch)
tree6a3e1eda4c32e6f38b2ad9e677d04cb7d9191692 /include/hw/usb.h
parenteb19d2b9d15bf68d27704e8727772924681644b8 (diff)
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>
Diffstat (limited to 'include/hw/usb.h')
-rw-r--r--include/hw/usb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/usb.h b/include/hw/usb.h
index 8f3947069e..847c9dec7f 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -347,6 +347,7 @@ typedef struct USBDeviceClass {
const char *product_desc;
const USBDesc *usb_desc;
+ bool attached_settable;
} USBDeviceClass;
typedef struct USBPortOps {