From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ9kJ-0005Lg-Ox for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ9kG-0005IT-1l for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:23 -0400 Received: from [199.232.76.173] (port=39585 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ9kF-0005IA-MN for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:19 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43752) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ9kE-0006KR-Ow for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:19 -0400 Date: Tue, 23 Jun 2009 14:25:10 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 04/11] QMP: Make monitor_handle_command() QMP aware Message-ID: <20090623142510.38960c1a@doriath> In-Reply-To: <4A40DDD4.3050108@codemonkey.ws> References: <20090623012849.3150a245@doriath> <4A40DDD4.3050108@codemonkey.ws> 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: Anthony Liguori Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, avi@redhat.com On Tue, 23 Jun 2009 08:51:16 -0500 Anthony Liguori wrote: > Luiz Capitulino wrote: > > Two changes are needed in monitor_handle_command() so that it > > knows how to work in control mode. > > > > First, it has to know whether a given command is part of the > > protocol or not. Second, it has to print the correct server > > response when a command execution finishes. > > > > A good approach to do this would be: > > > > 1. Add a new member to struct mon_cmd_t, which will tell if > > the command is already part of the protocol. > > > > 2. Change handler_* functions to return exit status, so that > > monitor_handle_command() can print "+ OK" or "- ERR" > > accordling. > > > These changes are a requirement for merging. Yes, sure. Would never ask you to merge such a hack.