From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PULL 2/5] block: Propagate error in bdrv_img_create()
Date: Mon, 10 Nov 2014 11:57:09 +0100 [thread overview]
Message-ID: <1415617032-12850-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1415617032-12850-1-git-send-email-kwolf@redhat.com>
From: Max Reitz <mreitz@redhat.com>
If the specified backing file could not be opened, do not generate a new
error message which contains the message which has been generated by
bdrv_open(), but just propagate the latter.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/block.c b/block.c
index dacd881..4b5735c 100644
--- a/block.c
+++ b/block.c
@@ -5608,11 +5608,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
ret = bdrv_open(&bs, backing_file, NULL, NULL, back_flags,
backing_drv, &local_err);
if (ret < 0) {
- error_setg_errno(errp, -ret, "Could not open '%s': %s",
- backing_file,
- error_get_pretty(local_err));
- error_free(local_err);
- local_err = NULL;
goto out;
}
size = bdrv_getlength(bs);
--
1.8.3.1
next prev parent reply other threads:[~2014-11-10 10:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 10:57 [Qemu-devel] [PULL 0/5] Block patches for 2.2 Kevin Wolf
2014-11-10 10:57 ` [Qemu-devel] [PULL 1/5] qemu-img: Omit error_report() after img_open() Kevin Wolf
2014-11-10 10:57 ` Kevin Wolf [this message]
2014-11-10 10:57 ` [Qemu-devel] [PULL 3/5] iotests: Add test for non-existing backing file Kevin Wolf
2014-11-10 10:57 ` [Qemu-devel] [PULL 4/5] qapi: Complete BlkdebugEvent Kevin Wolf
2014-11-10 10:57 ` [Qemu-devel] [PULL 5/5] block/vdi: Limit maximum size even futher Kevin Wolf
2014-11-10 20:00 ` [Qemu-devel] [PULL 0/5] Block patches for 2.2 Peter Maydell
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=1415617032-12850-3-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.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).