From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDhl-0006ZQ-FC for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:08:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYDha-0005wk-QS for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:08:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDha-0005vq-Jw for qemu-devel@nongnu.org; Wed, 18 Mar 2015 09:08:02 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2ID82ea010907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 18 Mar 2015 09:08:02 -0400 From: Gerd Hoffmann Date: Wed, 18 Mar 2015 14:07:47 +0100 Message-Id: <1426684075-27224-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1426684075-27224-1-git-send-email-kraxel@redhat.com> References: <1426684075-27224-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 05/13] monitor: Drop dead QMP check from monitor_read_password() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Luiz Capitulino , Markus Armbruster , Gerd Hoffmann From: Markus Armbruster 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 --- monitor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 8b703f9..1b46d07 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; -- 1.8.3.1