All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [6696] block: Introduce bdrv_get_encrypted_filename (Jan Kiszka)
@ 2009-03-05 19:42 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-03-05 19:42 UTC (permalink / raw)
  To: qemu-devel

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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-05 19:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-05 19:42 [Qemu-devel] [6696] block: Introduce bdrv_get_encrypted_filename (Jan Kiszka) Anthony Liguori

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.