From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6696] block: Introduce bdrv_get_encrypted_filename (Jan Kiszka)
Date: Thu, 05 Mar 2009 19:42:20 +0000 [thread overview]
Message-ID: <E1LfJSW-0002VC-4e@cvs.savannah.gnu.org> (raw)
Revision: 6696
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6696
Author: aliguori
Date: 2009-03-05 19:42:19 +0000 (Thu, 05 Mar 2009)
Log Message:
-----------
block: Introduce bdrv_get_encrypted_filename (Jan Kiszka)
Introduce bdrv_get_encrypted_filename service to allow more informative
password prompting.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
branches/stable_0_10_0/block.c
branches/stable_0_10_0/block.h
Modified: branches/stable_0_10_0/block.c
===================================================================
--- branches/stable_0_10_0/block.c 2009-03-05 19:42:15 UTC (rev 6695)
+++ branches/stable_0_10_0/block.c 2009-03-05 19:42:19 UTC (rev 6696)
@@ -1134,6 +1134,16 @@
}
}
+const char *bdrv_get_encrypted_filename(BlockDriverState *bs)
+{
+ if (bs->backing_hd && bs->backing_hd->encrypted)
+ return bs->backing_file;
+ else if (bs->encrypted)
+ return bs->filename;
+ else
+ return NULL;
+}
+
void bdrv_get_backing_filename(BlockDriverState *bs,
char *filename, int filename_size)
{
Modified: branches/stable_0_10_0/block.h
===================================================================
--- branches/stable_0_10_0/block.h 2009-03-05 19:42:15 UTC (rev 6695)
+++ branches/stable_0_10_0/block.h 2009-03-05 19:42:19 UTC (rev 6696)
@@ -152,6 +152,7 @@
const uint8_t *buf, int nb_sectors);
int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
+const char *bdrv_get_encrypted_filename(BlockDriverState *bs);
void bdrv_get_backing_filename(BlockDriverState *bs,
char *filename, int filename_size);
int bdrv_snapshot_create(BlockDriverState *bs,
reply other threads:[~2009-03-05 19:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1LfJSW-0002VC-4e@cvs.savannah.gnu.org \
--to=anthony@codemonkey.ws \
--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 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.