aboutsummaryrefslogtreecommitdiff
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
commit5c5dafdc5ecb2fd5080189e9ea4adcfa4e03ad5d (patch)
tree75f5c7ba14be5d721f066cc89966954c3bd33447
parent49c47daa3221aaf3765e9fb77cb98e62a55b7bf8 (diff)
virtio blk: fix warning.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-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);