|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [PATCH 04/15] monitor: Add user_print() to mon_cmd_t |
Date: | Tue, 06 Oct 2009 20:40:31 -0500 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090825) |
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...
<snip>
+ { + .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
[Prev in Thread] | Current Thread | [Next in Thread] |