Received: from [140.186.70.92] (port=44612 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0ubN-0000H7-2x for qemu-devel@nongnu.org; Wed, 29 Sep 2010 07:13:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0ubL-0002Iz-SH for qemu-devel@nongnu.org; Wed, 29 Sep 2010 07:13:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34073) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0ubL-0002It-KM for qemu-devel@nongnu.org; Wed, 29 Sep 2010 07:13:31 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 03/18] QMP: Don't use do_info() References: <1284668464-15981-1-git-send-email-lcapitulino@redhat.com> <1284668464-15981-4-git-send-email-lcapitulino@redhat.com> Date: Wed, 29 Sep 2010 13:13:28 +0200 In-Reply-To: <1284668464-15981-4-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Thu, 16 Sep 2010 17:20:49 -0300") 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: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Luiz Capitulino writes: > Since its inception, QMP has been using HMP's do_info() function > to run query commands. > > This was a bad choice, as it made do_info() more complex and > contributed to couple QMP and HMP. > > This commit fixes that by doing the following changes: > > 1. Introduce qmp_find_query_cmd() and use it to directly lookup > the info_cmds table > > 2. Introduce qmp_call_query_cmd() so that QMP code is able > to call query handlers without using do_info() > > 3. Drop do_info() usage The use via monitor_find_command("info"). > We need all the three changes in one shot so that we don't break > the calling of query commands in QMP. [...]