From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/4] block: Eliminate silly QERR_ macros used for encryption keys
Date: Thu, 15 Jan 2015 13:49:18 +0100 [thread overview]
Message-ID: <20150115124918.GD4361@noname.redhat.com> (raw)
In-Reply-To: <874mrs1al6.fsf@blackfin.pond.sub.org>
Am 15.01.2015 um 13:40 hat Markus Armbruster geschrieben:
> Kevin Wolf <kwolf@redhat.com> writes:
>
> > Am 14.01.2015 um 15:31 hat Markus Armbruster geschrieben:
> >> The QERR_ macros are leftovers from the days of "rich" error objects.
> >> They're used with error_set() and qerror_report(), and expand into the
> >> first *two* arguments. This trickiness has become pointless. Clean
> >> up QERR_DEVICE_ENCRYPTED and QERR_DEVICE_NOT_ENCRYPTED.
> >>
> >> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> >> ---
> >> block.c | 6 ++++--
> >> include/qapi/qmp/qerror.h | 6 ------
> >> 2 files changed, 4 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/block.c b/block.c
> >> index ba005f3..4cf6d29 100644
> >> --- a/block.c
> >> +++ b/block.c
> >> @@ -3737,14 +3737,16 @@ void bdrv_add_key(BlockDriverState *bs, const char *key, Error **errp)
> >> {
> >> if (key) {
> >> if (!bdrv_is_encrypted(bs)) {
> >> - error_set(errp, QERR_DEVICE_NOT_ENCRYPTED,
> >> + error_set(errp, ERROR_CLASS_GENERIC_ERROR,
> >> + "Device '%s' is not encrypted",
> >> bdrv_get_device_name(bs));
> >
> > Why not error_setg()?
>
> Because I forgot? I'll respin unless you prefer to fix it up on commit.
I would fix it on commit, but it's Stefan's week, so whatever he prefers.
Kevin
next prev parent reply other threads:[~2015-01-15 12:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 14:31 [Qemu-devel] [PATCH 0/4] block: Cleanups around error reporting Markus Armbruster
2015-01-14 14:31 ` [Qemu-devel] [PATCH 1/4] blockdev: Give find_block_job() an Error ** parameter Markus Armbruster
2015-01-14 14:31 ` [Qemu-devel] [PATCH 2/4] blockdev: Eliminate silly QERR_BLOCK_JOB_NOT_ACTIVE macro Markus Armbruster
2015-01-14 14:31 ` [Qemu-devel] [PATCH 3/4] block: New bdrv_add_key(), convert monitor to use it Markus Armbruster
2015-01-14 14:31 ` [Qemu-devel] [PATCH 4/4] block: Eliminate silly QERR_ macros used for encryption keys Markus Armbruster
2015-01-15 9:55 ` Kevin Wolf
2015-01-15 12:40 ` Markus Armbruster
2015-01-15 12:49 ` Kevin Wolf [this message]
2015-01-14 15:32 ` [Qemu-devel] [PATCH 0/4] block: Cleanups around error reporting Eric Blake
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=20150115124918.GD4361@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.