[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/12] monitor: remove mhandler.cmd_new
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 06/12] monitor: remove mhandler.cmd_new |
Date: |
Fri, 24 Jun 2016 16:20:38 +0200 |
Hi
On Fri, Jun 24, 2016 at 6:39 AM, Eric Blake <address@hidden> wrote:
> On 06/22/2016 06:08 PM, address@hidden wrote:
>> From: Marc-André Lureau <address@hidden>
>>
>> This is no longer necessary, now that middle mode has been removed.
>>
>> Signed-off-by: Marc-André Lureau <address@hidden>
>> ---
>> docs/writing-qmp-commands.txt | 8 +-
>> hmp-commands-info.hx | 118 ++++++++++++------------
>> hmp-commands.hx | 206
>> +++++++++++++++++++++---------------------
>> monitor.c | 11 +--
>> 4 files changed, 168 insertions(+), 175 deletions(-)
>
> The changes to hmp-commands*.hx are mechanical; you may want to set up
> git to order the diff so that more relevant files like monitor.c are
> listed first. Do that by 'git config diff.orderFile /path/to/file',
> then in that file, listing globs in the order that you want to prioritize.
>
Nice tip, didn't know about it. I wonder if it would be worth to have
one in qemu source tree..
>> +++ b/monitor.c
>> @@ -130,13 +130,10 @@ typedef struct mon_cmd_t {
>> const char *args_type;
>> const char *params;
>> const char *help;
>> - union {
>> - void (*cmd)(Monitor *mon, const QDict *qdict);
>> - void (*cmd_new)(QDict *params, QObject **ret_data, Error **errp);
>> - } mhandler;
>> + void (*cmd)(Monitor *mon, const QDict *qdict);
>> /* @sub_table is a list of 2nd level of commands. If it do not exist,
>
> As long as you are touching this, fix the grammar bug: s/do/does/
>
>> - * mhandler should be used. If it exist, sub_table[?].mhandler should be
>> - * used, and mhandler of 1st level plays the role of help function.
>> + * cmd should be used. If it exist, sub_table[?].cmd should be
>
> s/exist/exists/
>
fixed both
>> + * used, and cmd of 1st level plays the role of help function.
>> */
>> struct mon_cmd_t *sub_table;
>> void (*command_completion)(ReadLineState *rs, int nb_args, const char
>> *str);
>> @@ -2927,7 +2924,7 @@ static void handle_hmp_command(Monitor *mon, const
>> char *cmdline)
>> return;
>> }
>>
>> - cmd->mhandler.cmd(mon, qdict);
>> + cmd->cmd(mon, qdict);
>> QDECREF(qdict);
>> }
>>
>>
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
--
Marc-André Lureau
- [Qemu-devel] [PATCH 01/12] qapi-schema: use generated marshaller for 'qmp_capabilities', (continued)
- [Qemu-devel] [PATCH 08/12] build-sys: remove qmp-commands-old.h, marcandre . lureau, 2016/06/22
- [Qemu-devel] [PATCH 09/12] qapi: remove the "middle" mode, marcandre . lureau, 2016/06/22
- [Qemu-devel] [PATCH 10/12] monitor: use qmp_dispatch(), marcandre . lureau, 2016/06/22
- [Qemu-devel] [PATCH 11/12] qmp: update qmp_query_spice fallback, marcandre . lureau, 2016/06/22
- [Qemu-devel] [PATCH 12/12] Drop qmp-commands.hx, marcandre . lureau, 2016/06/22