From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ6PK-00086i-Bn for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:51:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ6PF-00082s-KP for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:51:29 -0400 Received: from [199.232.76.173] (port=52620 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ6PF-00082j-3L for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:51:25 -0400 Received: from mail-fx0-f209.google.com ([209.85.220.209]:52803) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ6PE-0006LI-93 for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:51:24 -0400 Received: by fxm5 with SMTP id 5so71855fxm.34 for ; Tue, 23 Jun 2009 06:51:22 -0700 (PDT) Message-ID: <4A40DDD4.3050108@codemonkey.ws> Date: Tue, 23 Jun 2009 08:51:16 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 04/11] QMP: Make monitor_handle_command() QMP aware References: <20090623012849.3150a245@doriath> In-Reply-To: <20090623012849.3150a245@doriath> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, avi@redhat.com 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. Regards, Anthony Liguori