monitor: Drop dead QMP check from monitor_read_password()
authorMarkus Armbruster <armbru@redhat.com>
Thu, 12 Mar 2015 16:26:46 +0000 (17:26 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 17 Mar 2015 13:11:43 +0000 (14:11 +0100)
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>
monitor.c

index 8b703f97be6a55f2ad20f3e9c7283ecf54e5dc43..1b46d0718d5132b0f462e468c03fd133f8ca59fb 100644 (file)
--- 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;