qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Beth Kon <eak@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Clarify error msg when open of backing file fails
Date: Thu, 08 May 2008 13:50:08 -0400	[thread overview]
Message-ID: <1210269009.6551.17.camel@beth-ubuntu> (raw)

This patch clarifies the error message when a problem is encountered
opening a backing file. Currently the only message printed in this case
is:

" qemu: could not open disk image /path/to/image"

This can be confusing if the real error lies in finding the backing file
rather than the primary file.


diffstat output:
 block.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

Signed-off-by: Beth Kon <eak@us.ibm.com>

---
diff --git a/block.c b/block.c
index bd647a6..c99626f 100644
--- a/block.c
+++ b/block.c
@@ -416,8 +416,11 @@ int bdrv_open2(BlockDriverState *bs, const char
*filename, 
         }
         path_combine(backing_filename, sizeof(backing_filename),
                      filename, bs->backing_file);
-        if (bdrv_open(bs->backing_hd, backing_filename, 0) < 0)
-            goto fail;
+        if (bdrv_open(bs->backing_hd, backing_filename, 0) < 0) {
+            fprintf(stderr, "qemu: could not open backing file %s\n",
+                                             backing_filename);
+            goto fail; 
+        }    
     }
 
     /* call the change callback */


-- 
Elizabeth Kon (Beth)
IBM Linux Technology Center
Open Hypervisor Team
email: eak@us.ibm.com

             reply	other threads:[~2008-05-08 17:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 17:50 Beth Kon [this message]
2008-05-09 18:43 ` [Qemu-devel] [PATCH] Clarify error msg when open of backing file fails Aurelien Jarno

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=1210269009.6551.17.camel@beth-ubuntu \
    --to=eak@us.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).