From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfcMd-0002Y1-3V for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:25:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfcMX-0002WK-8o for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:25:45 -0400 Received: from [199.232.76.173] (port=48893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfcMW-0002W1-7h for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:25:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62793) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfcMV-0007mK-Lo for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:25:40 -0400 Subject: Re: [Qemu-devel] [PATCH 07/29] monitor: Setup a QDict with arguments to handlers References: <1250723280-3509-1-git-send-email-lcapitulino@redhat.com> <1250723280-3509-8-git-send-email-lcapitulino@redhat.com> From: Markus Armbruster Date: Mon, 24 Aug 2009 18:25:37 +0200 In-Reply-To: <1250723280-3509-8-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Wed\, 19 Aug 2009 20\:07\:38 -0300") Message-ID: <87ljl9i3ge.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, avi@redhat.com Luiz Capitulino writes: > With this commit monitor_handle_command() will be able to setup a > QDict with arguments to command handlers. > > However, the current 'args[]' method is still being used, next > changes will port commands to get their arguments from the dictionary. > > Two changes are worth noting: > > 1. The '/' argument type always adds the following standard keys in the > dictionary: 'count', 'format' and 'size'. This way, the argument > name used in the 'args_type' string doesn't matter Can have at most one '/' argument then. Hmm. Document as restriction? > 2. The optional argument type '?' doesn't need to pass the additional > 'has_arg' argument, hanlders can do the same check with qdict_exists()