From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mfd1X-000101-2D for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:08:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mfd1S-0000yU-GR for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:08:02 -0400 Received: from [199.232.76.173] (port=52753 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mfd1S-0000y3-9U for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:07:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15334) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mfd1Q-0007Au-Pn for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:07:57 -0400 Date: Mon, 24 Aug 2009 14:07:46 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 07/29] monitor: Setup a QDict with arguments to handlers Message-ID: <20090824140746.77fa7187@doriath> In-Reply-To: <87ljl9i3ge.fsf@pike.pond.sub.org> References: <1250723280-3509-1-git-send-email-lcapitulino@redhat.com> <1250723280-3509-8-git-send-email-lcapitulino@redhat.com> <87ljl9i3ge.fsf@pike.pond.sub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, avi@redhat.com On Mon, 24 Aug 2009 18:25:37 +0200 Markus Armbruster wrote: > 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? Yes. There are ways to fix this if needed, but no handler uses more than one and I don't see a use case for this either. > > > 2. The optional argument type '?' doesn't need to pass the additional > > 'has_arg' argument, hanlders can do the same check with qdict_exists()