From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvLWB-0002li-U5 for qemu-devel@nongnu.org; Tue, 06 Oct 2009 21:40:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvLW7-0002fz-7Q for qemu-devel@nongnu.org; Tue, 06 Oct 2009 21:40:39 -0400 Received: from [199.232.76.173] (port=37432 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvLW6-0002fj-W3 for qemu-devel@nongnu.org; Tue, 06 Oct 2009 21:40:35 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:49011) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MvLW6-0006yD-ML for qemu-devel@nongnu.org; Tue, 06 Oct 2009 21:40:34 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e4.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n971X8I2009556 for ; Tue, 6 Oct 2009 21:33:08 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n971eXDL253784 for ; Tue, 6 Oct 2009 21:40:33 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n971eXtX001456 for ; Tue, 6 Oct 2009 21:40:33 -0400 Message-ID: <4ACBF18F.4010205@us.ibm.com> Date: Tue, 06 Oct 2009 20:40:31 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1254875232-25012-1-git-send-email-lcapitulino@redhat.com> <1254875232-25012-5-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1254875232-25012-5-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Luiz Capitulino Cc: 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. > > 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... > + { > + .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 :-) -- Regards, Anthony Liguori