From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjHTV-0000dM-Ac for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:56:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjHTQ-0000d7-3e for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:56:01 -0400 Received: from [199.232.76.173] (port=53014 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjHTQ-0000d4-0h for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:55:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64180) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjHTP-0000Qo-Hb for qemu-devel@nongnu.org; Thu, 03 Sep 2009 14:55:55 -0400 From: Juan Quintela In-Reply-To: <1251987859-20254-2-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Thu, 3 Sep 2009 11:24:15 -0300") References: <1251987859-20254-1-git-send-email-lcapitulino@redhat.com> <1251987859-20254-2-git-send-email-lcapitulino@redhat.com> Date: Thu, 03 Sep 2009 20:55:51 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, avi@redhat.com 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. > - { "version", "", do_info_version, > + { "version", "", do_info_version, NULL, > "", "show the version of QEMU" }, Later, Juan.