From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyjS1-0003dh-Ql for qemu-devel@nongnu.org; Tue, 07 Aug 2012 09:03:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyjRw-0001yG-VY for qemu-devel@nongnu.org; Tue, 07 Aug 2012 09:03:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyjRw-0001xs-NH for qemu-devel@nongnu.org; Tue, 07 Aug 2012 09:03:52 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q77D3pwj003508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Aug 2012 09:03:51 -0400 From: Pavel Hrdina Date: Tue, 7 Aug 2012 15:03:49 +0200 Message-Id: <3c770151454e19e279d1ecae8bb4daaf456df9de.1344344200.git.phrdina@redhat.com> Subject: [Qemu-devel] [PATCH 1/1] hmp: allow "bool" parameter to be optional List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Pavel Hrdina Signed-off-by: Pavel Hrdina --- monitor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monitor.c b/monitor.c index bbf30e6..2b3583c 100644 --- a/monitor.c +++ b/monitor.c @@ -3778,6 +3778,9 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon, val = 1; } else if (p - beg == 3 && !memcmp(beg, "off", p - beg)) { val = 0; + } else if (*typestr == '?') { + typestr++; + break; } else { monitor_printf(mon, "Expected 'on' or 'off'\n"); goto fail; -- 1.7.11.2