summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-06-12 09:50:18 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-16 15:18:39 -0500
commit78235eba4e09001b64b5d6563f2862d387580997 (patch)
tree75f5c7ba14be5d721f066cc89966954c3bd33447 /hw
parent4ceb182ca405c3b45047f8f134897f8a50058a4b (diff)
downloadqemu-78235eba4e09001b64b5d6563f2862d387580997.tar.gz
qemu-78235eba4e09001b64b5d6563f2862d387580997.tar.bz2
qemu-78235eba4e09001b64b5d6563f2862d387580997.zip
virtio blk: fix warning.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio-blk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 9a0c0674fc..5d33559966 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -294,6 +294,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config)
bdrv_get_geometry(s->bs, &capacity);
bdrv_get_geometry_hint(s->bs, &cylinders, &heads, &secs);
+ memset(&blkcfg, 0, sizeof(blkcfg));
stq_raw(&blkcfg.capacity, capacity);
stl_raw(&blkcfg.seg_max, 128 - 2);
stw_raw(&blkcfg.cylinders, cylinders);