aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-blk.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-12-01 07:11:51 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-12-01 07:11:51 +0200
commitc924f36a300cbc54d3cb511116e8e2bae17f5ae6 (patch)
tree04e57676b1db1db7d8b33934b349f8f37780fa2a /hw/virtio-blk.c
parent1abeb5a65d515f8a8a9cfc4a82342f731bd9321f (diff)
parent09fa35e5cdc7d17ed3e1528ca743893ae77a0ea2 (diff)
Merge remote branch 'origin/master' into pci
Conflicts: Makefile.objs hw/virtio.c
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r--hw/virtio-blk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index dbe207070e..e5f9b2795a 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -273,7 +273,7 @@ static void virtio_blk_handle_flush(VirtIOBlockReq *req, MultiReqBuffer *mrb)
acb = bdrv_aio_flush(req->dev->bs, virtio_blk_flush_complete, req);
if (!acb) {
- virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
+ virtio_blk_flush_complete(req, -EIO);
}
}
@@ -324,13 +324,13 @@ static void virtio_blk_handle_request(VirtIOBlockReq *req,
MultiReqBuffer *mrb)
{
if (req->elem.out_num < 1 || req->elem.in_num < 1) {
- fprintf(stderr, "virtio-blk missing headers\n");
+ error_report("virtio-blk missing headers");
exit(1);
}
if (req->elem.out_sg[0].iov_len < sizeof(*req->out) ||
req->elem.in_sg[req->elem.in_num - 1].iov_len < sizeof(*req->in)) {
- fprintf(stderr, "virtio-blk header not in correct element\n");
+ error_report("virtio-blk header not in correct element");
exit(1);
}