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 17:46:58 -0500
commit71080d96fd424a2da5771820e62b28971dc54008 (patch)
treecabe8f50b542ebeb2b22eb297f564f1226d13c48
parenta5617318fe3b24621ff682a144c53e5dc953dc08 (diff)
virtio blk: fix warning.
(cherry picked from commit 5c5dafdc5ecb2fd5080189e9ea4adcfa4e03ad5d) 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 520ad1bf21..0b3c2ac62c 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -247,6 +247,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);