qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/4] virtio-blk: Convert fprintf() to error_report()
Date: Mon, 15 Nov 2010 20:44:35 +0000	[thread overview]
Message-ID: <1289853878-15188-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1289853878-15188-1-git-send-email-stefanha@linux.vnet.ibm.com>

Errors should be logged using error_report() so they go to the
appropriate monitor.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/virtio-blk.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 49528a9..e5f9b27 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);
     }
 
-- 
1.7.2.3

  reply	other threads:[~2010-11-16  0:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 20:44 [Qemu-devel] [PATCH 0/4] virtio: Convert fprintf() to error_report() Stefan Hajnoczi
2010-11-15 20:44 ` Stefan Hajnoczi [this message]
2010-11-15 20:44 ` [Qemu-devel] [PATCH 2/4] " Stefan Hajnoczi
2010-11-16 10:01   ` Markus Armbruster
2010-11-15 20:44 ` [Qemu-devel] [PATCH 3/4] virtio-net: " Stefan Hajnoczi
2010-11-15 20:44 ` [Qemu-devel] [PATCH 4/4] virtio-pci: " Stefan Hajnoczi
2010-11-21 15:20 ` [Qemu-devel] [PATCH 0/4] virtio: " Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1289853878-15188-2-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).