Kevin Wolf <kw...@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 <arm...@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.