From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH 08/10] qerror: Extend QERR_DEVICE_ENCRYPTED
Date: Mon, 9 Jan 2012 09:24:15 -0200 [thread overview]
Message-ID: <1326108257-13042-9-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1326108257-13042-1-git-send-email-lcapitulino@redhat.com>
Include the name of the encrypted file.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
monitor.c | 3 ++-
qerror.h | 2 +-
qmp.c | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/monitor.c b/monitor.c
index bd4bc4f..f85a9d2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4682,7 +4682,8 @@ int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
}
if (monitor_ctrl_mode(mon)) {
- qerror_report(QERR_DEVICE_ENCRYPTED, bdrv_get_device_name(bs));
+ qerror_report(QERR_DEVICE_ENCRYPTED, bdrv_get_device_name(bs),
+ bdrv_get_encrypted_filename(bs));
return -1;
}
diff --git a/qerror.h b/qerror.h
index efda232..27800fe 100644
--- a/qerror.h
+++ b/qerror.h
@@ -70,7 +70,7 @@ QError *qobject_to_qerror(const QObject *obj);
"{ 'class': 'CommandDisabled', 'data': { 'name': %s } }"
#define QERR_DEVICE_ENCRYPTED \
- "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }"
+ "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s, 'filename': %s } }"
#define QERR_DEVICE_INIT_FAILED \
"{ 'class': 'DeviceInitFailed', 'data': { 'device': %s } }"
diff --git a/qmp.c b/qmp.c
index fb94f0f..00ae7ec 100644
--- a/qmp.c
+++ b/qmp.c
@@ -133,7 +133,8 @@ static void encrypted_bdrv_it(void *opaque, BlockDriverState *bs)
Error **err = opaque;
if (!error_is_set(err) && bdrv_key_required(bs)) {
- error_set(err, QERR_DEVICE_ENCRYPTED, bdrv_get_device_name(bs));
+ error_set(err, QERR_DEVICE_ENCRYPTED, bdrv_get_device_name(bs),
+ bdrv_get_encrypted_filename(bs));
}
}
--
1.7.8.2.325.g247f9.dirty
next prev parent reply other threads:[~2012-01-09 11:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 11:24 [Qemu-devel] [PATCH v1 00/10]: QAPI conversions round 4 Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 01/10] vnc: Simplify vnc_display_password() Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 02/10] qapi: Convert set_password Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 03/10] qapi: Convert expire_password Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 04/10] block: eject_device(): Use error_set() Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 05/10] qapi: Convert eject Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 06/10] monitor: expose readline state Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 07/10] qapi: Introduce change-vnc-password Luiz Capitulino
2012-01-09 11:24 ` Luiz Capitulino [this message]
2012-01-09 11:24 ` [Qemu-devel] [PATCH 09/10] qapi: Convert change Luiz Capitulino
2012-01-09 11:24 ` [Qemu-devel] [PATCH 10/10] qapi: Convert block_set_io_throttle Luiz Capitulino
2012-01-13 20:53 ` Anthony Liguori
2012-01-17 15:18 ` Luiz Capitulino
2012-01-17 15:30 ` Zhi Yong Wu
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=1326108257-13042-9-git-send-email-lcapitulino@redhat.com \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=kwolf@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).