From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4977] qemu-img: set encrypted disk image password (Laurent Vivier)
Date: Fri, 01 Aug 2008 15:00:07 +0000 [thread overview]
Message-ID: <E1KOw6x-0004w9-3N@cvs.savannah.gnu.org> (raw)
Revision: 4977
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4977
Author: aliguori
Date: 2008-08-01 15:00:04 +0000 (Fri, 01 Aug 2008)
Log Message:
-----------
qemu-img: set encrypted disk image password (Laurent Vivier)
This patch modify qemu-img to ask and set a password when an encrypted
disk image is created.
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Modified Paths:
--------------
trunk/qemu-img.c
Modified: trunk/qemu-img.c
===================================================================
--- trunk/qemu-img.c 2008-08-01 14:51:02 UTC (rev 4976)
+++ trunk/qemu-img.c 2008-08-01 15:00:04 UTC (rev 4977)
@@ -208,6 +208,7 @@
uint64_t size;
const char *p;
BlockDriver *drv;
+ BlockDriverState *bs;
flags = 0;
for(;;) {
@@ -237,7 +238,6 @@
filename = argv[optind++];
size = 0;
if (base_filename) {
- BlockDriverState *bs;
bs = bdrv_new_open(base_filename, NULL);
bdrv_get_geometry(bs, &size);
size *= 512;
@@ -279,6 +279,9 @@
error("Error while formatting");
}
}
+ /* to set password */
+ bs = bdrv_new_open(filename, NULL);
+ bdrv_delete(bs);
return 0;
}
reply other threads:[~2008-08-01 15:00 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=E1KOw6x-0004w9-3N@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 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).