qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [RFC v3 5/6] qemu-img create: Emit filename on error
Date: Fri,  6 Sep 2013 17:52:34 +0200	[thread overview]
Message-ID: <1378482755-31669-6-git-send-email-mreitz@redhat.com> (raw)
In-Reply-To: <1378482755-31669-1-git-send-email-mreitz@redhat.com>

bdrv_img_create generally does not emit the target filename, although
this is pretty important information. Therefore, prepend its error
message with the output filename (if an error occurs).

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qemu-img.c b/qemu-img.c
index 6f8554e..a0c400b 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -410,7 +410,7 @@ static int img_create(int argc, char **argv)
     bdrv_img_create(filename, fmt, base_filename, base_fmt,
                     options, img_size, BDRV_O_FLAGS, &local_err, quiet);
     if (error_is_set(&local_err)) {
-        error_report("%s", error_get_pretty(local_err));
+        error_report("%s: %s", filename, error_get_pretty(local_err));
         error_free(local_err);
         return 1;
     }
-- 
1.8.4

  parent reply	other threads:[~2013-09-06 15:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 15:52 [Qemu-devel] [RFC v3 0/6] block: Error parameter for opening/creating images Max Reitz
2013-09-06 15:52 ` [Qemu-devel] [RFC v3 1/6] bdrv: Use "Error" for opening images Max Reitz
2013-09-06 15:52 ` [Qemu-devel] [RFC v3 2/6] bdrv: Use "Error" for creating images Max Reitz
2013-09-06 15:52 ` [Qemu-devel] [RFC v3 3/6] block: Error parameter for open functions Max Reitz
2013-09-06 15:52 ` [Qemu-devel] [RFC v3 4/6] block: Error parameter for create functions Max Reitz
2013-09-06 15:52 ` Max Reitz [this message]
2013-09-06 15:52 ` [Qemu-devel] [RFC v3 6/6] qcow2: Use Error parameter Max Reitz
2013-09-10 14:37 ` [Qemu-devel] [RFC v3 0/6] block: Error parameter for opening/creating images Kevin Wolf

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=1378482755-31669-6-git-send-email-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).