projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49c47da
)
virtio blk: fix warning.
author
Gerd Hoffmann
<kraxel@redhat.com>
Fri, 12 Jun 2009 07:50:18 +0000
(09:50 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Tue, 16 Jun 2009 20:18:39 +0000
(15:18 -0500)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-blk.c
patch
|
blob
|
history
diff --git
a/hw/virtio-blk.c
b/hw/virtio-blk.c
index
9a0c067
..
5d33559
100644
(file)
--- 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);