From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW5wq-0004hr-TF for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:27:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YW5wk-0001jF-7C for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:27:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW5wk-0001iJ-0c for qemu-devel@nongnu.org; Thu, 12 Mar 2015 12:26:54 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2CGQrPq023740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 12 Mar 2015 12:26:53 -0400 From: Markus Armbruster Date: Thu, 12 Mar 2015 17:26:46 +0100 Message-Id: <1426177610-4848-2-git-send-email-armbru@redhat.com> In-Reply-To: <1426177610-4848-1-git-send-email-armbru@redhat.com> References: <1426177610-4848-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 1/5] 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: kraxel@redhat.com, lcapitulino@redhat.com Function is only called in HMP context since commit 333a96e "qapi: Convert change". Signed-off-by: Markus Armbruster --- monitor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index c86a89e..29c930a 100644 --- a/monitor.c +++ b/monitor.c @@ -265,10 +265,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.9.3