Received: from [140.186.70.92] (port=54730 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORMh3-0002o1-DE for qemu-devel@nongnu.org; Wed, 23 Jun 2010 05:56:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORMh1-0003XO-Cb for qemu-devel@nongnu.org; Wed, 23 Jun 2010 05:56:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41737) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORMh1-0003X8-5Z for qemu-devel@nongnu.org; Wed, 23 Jun 2010 05:56:27 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH v4 13/23] monitor: Allow to specify HMP-specifc command arguments References: <26ecfe2b5f2e2eb9d720b6d3d34a78019ad24f80.1276641524.git.jan.kiszka@web.de> Date: Wed, 23 Jun 2010 11:56:22 +0200 In-Reply-To: <26ecfe2b5f2e2eb9d720b6d3d34a78019ad24f80.1276641524.git.jan.kiszka@web.de> (Jan Kiszka's message of "Wed, 16 Jun 2010 00:38:37 +0200") Message-ID: 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: Jan Kiszka Cc: Anthony Liguori , Juan Quintela , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Blue Swirl , Avi Kivity Jan Kiszka writes: > From: Jan Kiszka > > As we may want to shrink or enhance the argument set used for monitor > command in HMP mode, add a separate, optional argument string for that > case. When an HMP request is parsed, this argument string, if available, > takes precedence over the standard string. > > Signed-off-by: Jan Kiszka args_type strings are such a crude tool... I fear having two of them just breeds inconsistencies. There's a big difference between QMP and HMP: QMP has only named parameters, HMP only positional parameters (type 'O' provides named options within a positional parameter). I figure the proper way to deal with this is to define QMP parameters in a data structure (we need that for self-documentation anyway), then define a mapping from HMP positional parameters to QMP named parameters.