From: Kevin Wolf Date: Thu, 5 Nov 2009 12:08:59 +0000 (+0100) Subject: virtio-blk: Pass read errors to the guest X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~6125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49c3c8dca7b324d0aed590bb747be2179cc631cc;p=sdk%2Femulator%2Fqemu.git virtio-blk: Pass read errors to the guest We need to signal not only write errors, but also read errors to the guest driver. This fixes a regression introduced by 869a5c6d. Signed-off-by: Kevin Wolf Signed-off-by: Anthony Liguori --- diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index e6df9f2619..42b766fa2c 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -127,7 +127,7 @@ static void virtio_blk_rw_complete(void *opaque, int ret) return; } - virtio_blk_req_complete(req, VIRTIO_BLK_S_OK); + virtio_blk_req_complete(req, ret ? VIRTIO_BLK_S_IOERR : VIRTIO_BLK_S_OK); } static void virtio_blk_flush_complete(void *opaque, int ret)