summaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-01-20 14:11:04 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2017-01-24 23:26:54 +0300
commitcdab4dc01a38146543d5c0d0d09433cd4b776936 (patch)
tree6ca8ec52786d379263c879f198a10e1feb8d4d9b /hw/usb
parent7ae6c571151cff785a225d6916269bbe199f0ab1 (diff)
downloadqemu-cdab4dc01a38146543d5c0d0d09433cd4b776936.zip
usb: Set category and description of the MTP device
It's a storage device, so let's classify it accordingly. And while we're at it, also add a short description for people who do not know what MTP means. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/dev-mtp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 809dcf5cd6..94c2e94f10 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -1580,6 +1580,8 @@ static void usb_mtp_class_initfn(ObjectClass *klass, void *data)
uc->handle_reset = usb_mtp_handle_reset;
uc->handle_control = usb_mtp_handle_control;
uc->handle_data = usb_mtp_handle_data;
+ set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+ dc->desc = "USB Media Transfer Protocol device";
dc->fw_name = "mtp";
dc->vmsd = &vmstate_usb_mtp;
dc->props = mtp_properties;