From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvW0q-0005Ud-Bm for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:53:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvW0k-0005Rd-6h for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:52:58 -0400 Received: from [199.232.76.173] (port=42967 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvW0j-0005RS-Rr for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:52:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26201) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvW0j-0006xb-3A for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:52:53 -0400 Date: Wed, 7 Oct 2009 09:52:43 -0300 From: Luiz Capitulino Message-ID: <20091007095243.359df2d4@doriath> In-Reply-To: <4ACBF18F.4010205@us.ibm.com> References: <1254875232-25012-1-git-send-email-lcapitulino@redhat.com> <1254875232-25012-5-git-send-email-lcapitulino@redhat.com> <4ACBF18F.4010205@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 04/15] 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: Anthony Liguori Cc: qemu-devel@nongnu.org, avi@redhat.com On Tue, 06 Oct 2009 20:40:31 -0500 Anthony Liguori 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. > > > > It will also serve as a flag to say if a given handler has already > > been converted to the new QObject style. > > > > Additionally, this commit converts mon_cmd_t static initializations > > to the C99 way. > > > > This should really be two patches. One that does the mon_cmd_t init > conversion and then another that introduces user_print. This would be > easier if... Ok, will split. > > > + { > > + .name = "version", > > + .args_type = "", > > + .handler = do_info_version, > > + .user_print = NULL, > > + .params = "", > > + .help = "show the version of QEMU" > > + }, > > > > You didn't explicitly initialize things to NULL and made sure that > args_types = "" worked the same as args_type = NULL (and likewise for > params. This would help de-uglify what's happening in this file :-) I think this work is part of the patch series which will change args_type to be an array, as suggested by Markus. This is series is just an initial help.