aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-30 01:34:31 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-04-30 01:34:31 +0000
commit2bac601963afc6777692777c2e19666b589e85cd (patch)
treeab5e84692a25800c883b14eb4f7b06ee06fffc7f /monitor.c
parentc1713132e07955819477a87a0ce830358e77a147 (diff)
Remove repeated code and enable encrypted SD cards and USB sticks images.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2750 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/monitor.c b/monitor.c
index ed03b345ef..9f76c0976e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -386,8 +386,6 @@ static void do_eject(int force, const char *filename)
static void do_change(const char *device, const char *filename)
{
BlockDriverState *bs;
- int i;
- char password[256];
bs = bdrv_find(device);
if (!bs) {
@@ -397,15 +395,7 @@ static void do_change(const char *device, const char *filename)
if (eject_device(bs, 0) < 0)
return;
bdrv_open(bs, filename, 0);
- if (bdrv_is_encrypted(bs)) {
- term_printf("%s is encrypted.\n", device);
- for(i = 0; i < 3; i++) {
- monitor_readline("Password: ", 1, password, sizeof(password));
- if (bdrv_set_key(bs, password) == 0)
- break;
- term_printf("invalid password\n");
- }
- }
+ qemu_key_check(bs, filename);
}
static void do_screen_dump(const char *filename)