From: Markus Armbruster Date: Thu, 12 Mar 2015 16:26:46 +0000 (+0100) Subject: monitor: Drop dead QMP check from monitor_read_password() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bcf5d19c59a527c91bc29704f3e4956119c050cf;p=qemu.git 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 Reviewed-by: Eric Blake Signed-off-by: Gerd Hoffmann --- 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;