From patchwork Tue Aug 7 13:03:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Hrdina X-Patchwork-Id: 175625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B27432C009B for ; Tue, 7 Aug 2012 23:04:06 +1000 (EST) Received: from localhost ([::1]:54646 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyjS8-0003dm-QE for incoming@patchwork.ozlabs.org; Tue, 07 Aug 2012 09:04:04 -0400 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 Received: from antique-laptop.brq.redhat.com (dhcp-27-198.brq.redhat.com [10.34.27.198]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q77D3n4k028982; Tue, 7 Aug 2012 09:03:50 -0400 From: Pavel Hrdina To: qemu-devel@nongnu.org Date: Tue, 7 Aug 2012 15:03:49 +0200 Message-Id: <3c770151454e19e279d1ecae8bb4daaf456df9de.1344344200.git.phrdina@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Pavel Hrdina Subject: [Qemu-devel] [PATCH 1/1] hmp: allow "bool" parameter to be optional X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;