From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjHXE-0001lm-AN for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:59:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjHX9-0001jA-Lm for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:59:51 -0400 Received: from [199.232.76.173] (port=56393 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjHX9-0001j6-J8 for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:59:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39210) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjHX9-00014T-32 for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:59:47 -0400 Date: Thu, 3 Sep 2009 15:59:38 -0300 From: Luiz Capitulino Message-ID: <20090903155938.4f87e0c7@doriath> In-Reply-To: References: <1251987859-20254-1-git-send-email-lcapitulino@redhat.com> <1251987859-20254-2-git-send-email-lcapitulino@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/5] monitor: Add user_print() to mon_cmd_t List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, avi@redhat.com On Thu, 03 Sep 2009 20:55:51 +0200 Juan Quintela wrote: > Luiz Capitulino wrote: > > This new struct member will store a pointer to a function that > > should be used to output data in the user protocol format. > > > > Additionally, it will also serve as a flag to say if a given > > handler has already been ported to support the machine protocol. > > > > Signed-off-by: Luiz Capitulino > > --- > > monitor.c | 69 +++++++++++++++--------------- > > qemu-monitor.hx | 124 ++++++++++++++++++++++++++++-------------------------- > > 2 files changed, 99 insertions(+), 94 deletions(-) > > > > diff --git a/monitor.c b/monitor.c > > index a242b4b..b43a287 100644 > > --- a/monitor.c > > +++ b/monitor.c > > @@ -71,6 +71,7 @@ typedef struct mon_cmd_t { > > const char *name; > > const char *args_type; > > void *handler; > > + void (*user_print)(Monitor *mon, const QObject *data); > > const char *params; > > const char *help; > > } mon_cmd_t; > > @@ -1807,80 +1808,80 @@ static const mon_cmd_t mon_cmds[] = { > > > > /* Please update qemu-monitor.hx when adding or changing commands */ > > static const mon_cmd_t info_cmds[] = { > > Once that your are changing all of them, could you use c99 initializers, > that way it is easier to see what the action is. Yeah, I will do that for the real submission.