summaryrefslogtreecommitdiff
path: root/hw/virtio-pci.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-05-16 12:54:05 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-05-21 15:40:50 -0500
commit12c5674b846dccf1f80fb43b64606721e6f78976 (patch)
tree0e73f21e748f5dbc8be90fbb388f8b3aa7aac9da /hw/virtio-pci.c
parent0e47931b88a2352ecfdf21bb99256f399952544d (diff)
downloadqemu-12c5674b846dccf1f80fb43b64606721e6f78976.tar.gz
qemu-12c5674b846dccf1f80fb43b64606721e6f78976.tar.bz2
qemu-12c5674b846dccf1f80fb43b64606721e6f78976.zip
virtio-blk: define VirtIOBlkConf
We will have to add another field to the virtio-blk configuration in the next patch. Avoid a proliferation of arguments to virtio_blk_init. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r--hw/virtio-pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index f2f4153ade..a20c3cf6f2 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -697,8 +697,7 @@ static int virtio_blk_init_pci(PCIDevice *pci_dev)
proxy->class_code != PCI_CLASS_STORAGE_OTHER)
proxy->class_code = PCI_CLASS_STORAGE_SCSI;
- vdev = virtio_blk_init(&pci_dev->qdev, &proxy->block,
- &proxy->block_serial);
+ vdev = virtio_blk_init(&pci_dev->qdev, &proxy->blk);
if (!vdev) {
return -1;
}
@@ -813,8 +812,8 @@ static int virtio_balloon_exit_pci(PCIDevice *pci_dev)
static Property virtio_blk_properties[] = {
DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
- DEFINE_BLOCK_PROPERTIES(VirtIOPCIProxy, block),
- DEFINE_PROP_STRING("serial", VirtIOPCIProxy, block_serial),
+ DEFINE_BLOCK_PROPERTIES(VirtIOPCIProxy, blk.conf),
+ DEFINE_PROP_STRING("serial", VirtIOPCIProxy, blk.serial),
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
DEFINE_VIRTIO_BLK_FEATURES(VirtIOPCIProxy, host_features),