aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
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)