]> git.proxmox.com Git - qemu.git/commitdiff
usb storage: first migration support bits.
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Dec 2010 13:58:41 +0000 (14:58 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 20 Jul 2011 12:49:41 +0000 (14:49 +0200)
Tag vmstate as unmigratable for the time being,
to be removed when mgration support is finished.

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

index 86582cc723b881d728cf8285a1f2b5e8ab2d8c0e..8ed85943b8242b3d84a27b29be5611eaccfd1631 100644 (file)
@@ -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,