summaryrefslogtreecommitdiff
path: root/hw/virtio-blk.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-08-03 15:07:42 +0200
committerKevin Wolf <kwolf@redhat.com>2011-09-06 11:23:51 +0200
commit145feb176ffe6de1db6d05af064c841d7c16633c (patch)
treef69598e83c5a2b36fcecd043e7a234dcbeb77a2e /hw/virtio-blk.c
parent0e49de5232f47c9e58adb82c28d4f42be933d891 (diff)
downloadqemu-145feb176ffe6de1db6d05af064c841d7c16633c.tar.gz
qemu-145feb176ffe6de1db6d05af064c841d7c16633c.tar.bz2
qemu-145feb176ffe6de1db6d05af064c841d7c16633c.zip
block: Split change_cb() into change_media_cb(), resize_cb()
Multiplexing callbacks complicates matters needlessly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r--hw/virtio-blk.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index c10afa9962..4df23f4228 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -543,17 +543,15 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id)
return 0;
}
-static void virtio_blk_change_cb(void *opaque, int reason)
+static void virtio_blk_resize(void *opaque)
{
VirtIOBlock *s = opaque;
- if (reason & CHANGE_SIZE) {
- virtio_notify_config(&s->vdev);
- }
+ virtio_notify_config(&s->vdev);
}
static const BlockDevOps virtio_block_ops = {
- .change_cb = virtio_blk_change_cb,
+ .resize_cb = virtio_blk_resize,
};
VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *conf,