summaryrefslogtreecommitdiff
path: root/hw/usb-msd.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-12-10 14:58:41 +0100
committerGerd Hoffmann <kraxel@redhat.com>2011-07-20 14:49:41 +0200
commitf54b65630385d7dc7cf3442eb459d1a5b3d1a9c6 (patch)
treeeb88d7bb1b9414ce01278296dad37b0cefe1591a /hw/usb-msd.c
parent9490fb0624e67bce90297444fb960c2d9476239e (diff)
usb storage: first migration support bits.
Tag vmstate as unmigratable for the time being, to be removed when mgration support is finished. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-msd.c')
-rw-r--r--hw/usb-msd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 86582cc723..8ed85943b8 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -623,11 +623,23 @@ static USBDevice *usb_msd_init(const char *filename)
return dev;
}
+static const VMStateDescription vmstate_usb_msd = {
+ .name = "usb-storage",
+ .unmigratable = 1, /* FIXME: handle transactions which are in flight */
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField []) {
+ VMSTATE_USB_DEVICE(dev, MSDState),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static struct USBDeviceInfo msd_info = {
.product_desc = "QEMU USB MSD",
.qdev.name = "usb-storage",
.qdev.fw_name = "storage",
.qdev.size = sizeof(MSDState),
+ .qdev.vmsd = &vmstate_usb_msd,
.usb_desc = &desc,
.init = usb_msd_initfn,
.handle_packet = usb_generic_handle_packet,