virtio-blk: handle blk_getlength() errors
commit17d0bc01bfcce0ad4fb5105d4502595224569ff0
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 8 Aug 2017 12:22:51 +0000 (8 13:22 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 10 Aug 2017 13:33:43 +0000 (10 14:33 +0100)
tree5cea212defac3e69cc37a34936704a172f60114d
parentce317e8deac6ce82063e3c2681254475822d45c9
virtio-blk: handle blk_getlength() errors

If blk_getlength() fails in virtio_blk_update_config() consider the disk
image length to be 0 bytes.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 20170808122251.29815-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/block/virtio-blk.c