summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-12 17:26:46 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-03-17 14:11:43 +0100
commitbcf5d19c59a527c91bc29704f3e4956119c050cf (patch)
tree35c2fb66c70324e930125bb523ac7537304ff8b3 /monitor.c
parent63216dc78d2d52448afdfbe0e0bacb2c669083b4 (diff)
downloadqemu-bcf5d19c59a527c91bc29704f3e4956119c050cf.tar.gz
qemu-bcf5d19c59a527c91bc29704f3e4956119c050cf.tar.bz2
qemu-bcf5d19c59a527c91bc29704f3e4956119c050cf.zip
monitor: Drop dead QMP check from monitor_read_password()
Function is only called in HMP context since commit 333a96e "qapi: Convert change". Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/monitor.c b/monitor.c
index 8b703f97be..1b46d0718d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -266,10 +266,7 @@ void monitor_read_command(Monitor *mon, int show_prompt)
int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func,
void *opaque)
{
- if (monitor_ctrl_mode(mon)) {
- qerror_report(QERR_MISSING_PARAMETER, "password");
- return -EINVAL;
- } else if (mon->rs) {
+ if (mon->rs) {
readline_start(mon->rs, "Password: ", 1, readline_func, opaque);
/* prompt is printed on return from the command handler */
return 0;