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 4/5] blkdebug: Employ error parameter
Date: Thu, 10 Oct 2013 15:44:03 +0200 [thread overview]
Message-ID: <1381412644-16212-5-git-send-email-mreitz@redhat.com> (raw)
In-Reply-To: <1381412644-16212-1-git-send-email-mreitz@redhat.com>
Make use of the error parameter in blkdebug_open.
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
block/blkdebug.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index be948b2..16d2b91 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -362,8 +362,7 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags,
opts = qemu_opts_create_nofail(&runtime_opts);
qemu_opts_absorb_qdict(opts, options, &local_err);
if (error_is_set(&local_err)) {
- qerror_report_err(local_err);
- error_free(local_err);
+ error_propagate(errp, local_err);
ret = -EINVAL;
goto fail;
}
@@ -373,6 +372,7 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags,
if (config) {
ret = read_config(s, config);
if (ret < 0) {
+ error_setg_errno(errp, -ret, "Could not read blkdebug config file");
goto fail;
}
}
@@ -383,14 +383,14 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags,
/* Open the backing file */
filename = qemu_opt_get(opts, "x-image");
if (filename == NULL) {
+ error_setg(errp, "Could not retrieve image file name");
ret = -EINVAL;
goto fail;
}
ret = bdrv_file_open(&bs->file, filename, NULL, flags, &local_err);
if (ret < 0) {
- qerror_report_err(local_err);
- error_free(local_err);
+ error_propagate(errp, local_err);
goto fail;
}
--
1.8.3.1
next prev parent reply other threads:[~2013-10-10 13:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 13:43 [Qemu-devel] [PATCH 0/5] block: Employ error parameter Max Reitz
2013-10-10 13:44 ` [Qemu-devel] [PATCH 1/5] block/raw_bsd: " Max Reitz
2013-10-10 13:44 ` [Qemu-devel] [PATCH 2/5] block/raw-posix: " Max Reitz
2013-10-11 9:07 ` Kevin Wolf
2013-10-11 11:01 ` Markus Armbruster
2013-10-11 9:26 ` [Qemu-devel] [PATCH v2 " Max Reitz
2013-10-11 9:37 ` [Qemu-devel] [PATCH v3 " Max Reitz
2013-10-11 9:45 ` Kevin Wolf
2013-10-10 13:44 ` [Qemu-devel] [PATCH 3/5] block/raw-win32: " Max Reitz
2013-10-10 17:17 ` Eric Blake
2013-10-10 13:44 ` Max Reitz [this message]
2013-10-10 13:44 ` [Qemu-devel] [PATCH 5/5] blkverify: " Max Reitz
2013-10-10 17:18 ` [Qemu-devel] [PATCH 0/5] block: " Eric Blake
2013-10-11 9:33 ` 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=1381412644-16212-5-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).