[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/29] monitor: New format for handlers argument
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 06/29] monitor: New format for handlers argument types |
Date: |
Mon, 24 Aug 2009 18:21:17 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Luiz Capitulino <address@hidden> writes:
> Current handlers argument types, as defined in qemu-monitor.hx file,
> are a sequence of chars where each one represents one argument type
> of the command handler. The number of chars is also used to know how
> many arguments a given handler accepts.
>
> This commit defines a new format, which makes mandatory the use of
> a name for each argument.
>
> For example, do_eject() command handler is currently defined as:
>
> { "eject", "-fB", do_eject, ... }
>
> With the new format it becomes:
>
> { "eject", "force:-f,filename:B", do_eject, ... }
>
> This way the Monitor will be capable of setting up a dictionary, using
> each argument's name as the key and the argument itself as the value.
>
> This commit also adds two new functions: key_get_info() and
> next_arg_type(), both are used to parse the new format.
>
> Currently key_get_info() consumes the 'key' part of the new format and
> discards it, this way the current parsing code is not affected by this
> change.
>
> Signed-off-by: Luiz Capitulino <address@hidden>
Encoding the parameter list in a single args_type made perfect sense
when a parameter was encoded in one or two characters. But having
syntax and a parser... I don't know. Switch to an array of parameter
descriptions that don't need to be parsed?
There's some overlap between args_type (machine-readable description)
and params (human readable help text). Could the latter be assembled
from the former?
Just ideas...
- [Qemu-devel] Re: [PATCH 04/29] Introduce QDict, (continued)
[Qemu-devel] Re: [PATCH 04/29] Introduce QDict, Paolo Bonzini, 2009/08/20
Re: [Qemu-devel] [PATCH 04/29] Introduce QDict, Markus Armbruster, 2009/08/24
[Qemu-devel] [PATCH 05/29] Add wrappers to functions used by the Monitor, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 06/29] monitor: New format for handlers argument types, Luiz Capitulino, 2009/08/19
- Re: [Qemu-devel] [PATCH 06/29] monitor: New format for handlers argument types,
Markus Armbruster <=
[Qemu-devel] [PATCH 07/29] monitor: Setup a QDict with arguments to handlers, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 08/29] monitor: Export QDict header, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 09/29] monitor: Port handler_0 to use QDict, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 10/29] monitor: Port handler_1 to use QDict, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 11/29] monitor: Port handler_2 to use QDict, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 12/29] monitor: Port handler_3 to use QDict, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 14/29] monitor: Port handler_5 to use QDict, Luiz Capitulino, 2009/08/19