aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-blk.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2010-11-15 20:44:35 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2010-11-21 09:16:57 -0600
commit870cef1dae88f131ee3e17fe0aaf45d609798ce1 (patch)
tree6ca5034f3ef61149ddbbdc65c1567613bfce84a6 /hw/virtio-blk.c
parent281a26b15b4adcecb8604216738975abd754bea8 (diff)
virtio-blk: Convert fprintf() to error_report()
Errors should be logged using error_report() so they go to the appropriate monitor. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r--hw/virtio-blk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 49528a9977..e5f9b2795a 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -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);
}