Revision 94171e11
b/monitor.c | ||
---|---|---|
148 | 148 |
static int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func, |
149 | 149 |
void *opaque) |
150 | 150 |
{ |
151 |
if (mon->rs) { |
|
151 |
if (monitor_ctrl_mode(mon)) { |
|
152 |
qemu_error_new(QERR_MISSING_PARAMETER, "password"); |
|
153 |
return -EINVAL; |
|
154 |
} else if (mon->rs) { |
|
152 | 155 |
readline_start(mon->rs, "Password: ", 1, readline_func, opaque); |
153 | 156 |
/* prompt is printed on return from the command handler */ |
154 | 157 |
return 0; |
... | ... | |
4103 | 4106 |
return; |
4104 | 4107 |
} |
4105 | 4108 |
|
4109 |
if (monitor_ctrl_mode(mon)) { |
|
4110 |
qemu_error_new(QERR_DEVICE_ENCRYPTED, bdrv_get_device_name(bs)); |
|
4111 |
return; |
|
4112 |
} |
|
4113 |
|
|
4106 | 4114 |
monitor_printf(mon, "%s (%s) is encrypted.\n", bdrv_get_device_name(bs), |
4107 | 4115 |
bdrv_get_encrypted_filename(bs)); |
4108 | 4116 |
|
Also available in: Unified diff