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] [PATCH 5/7] qemu-img create: Emit filename on error
Date: Tue, 10 Sep 2013 16:49:36 +0200	[thread overview]
Message-ID: <1378824578-30394-6-git-send-email-mreitz@redhat.com> (raw)
In-Reply-To: <1378824578-30394-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 a8b82ad..20d8c02 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -412,7 +412,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.3.1

  parent reply	other threads:[~2013-09-10 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 14:49 [Qemu-devel] [PATCH 0/7] block: Error parameter for opening/creating images Max Reitz
2013-09-10 14:49 ` [Qemu-devel] [PATCH 1/7] bdrv: Use "Error" for opening images Max Reitz
2013-09-10 14:49 ` [Qemu-devel] [PATCH 2/7] bdrv: Use "Error" for creating images Max Reitz
2013-09-10 14:49 ` [Qemu-devel] [PATCH 3/7] block: Error parameter for open functions Max Reitz
2013-09-10 14:49 ` [Qemu-devel] [PATCH 4/7] block: Error parameter for create functions Max Reitz
2013-09-10 14:49 ` Max Reitz [this message]
2013-09-10 14:49 ` [Qemu-devel] [PATCH 6/7] qcow2: Use Error parameter Max Reitz
2013-09-10 14:49 ` [Qemu-devel] [PATCH 7/7] qemu-iotests: Adjustments due to error propagation Max Reitz
2013-09-11 14:56 ` [Qemu-devel] [PATCH 0/7] 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=1378824578-30394-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).