qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for op


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v4 11/23] monitor: Add completion support for option lists
Date: Wed, 23 Jun 2010 11:45:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Jan Kiszka <address@hidden> writes:

> From: Jan Kiszka <address@hidden>
>
> This enables command line completion inside option strings. A list of
> expected key names and their completion type can be appended to the 'O'
> inside parentheses ('O(key:type,...)'). The first use case is block
> device completion for the 'drive' option of 'device_add'.
>
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
>  monitor.c       |   68 
> ++++++++++++++++++++++++++++++++++++++++++++++---------
>  qemu-monitor.hx |    2 +-
>  2 files changed, 58 insertions(+), 12 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index c1006b4..3e0d862 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -68,6 +68,9 @@
>   * 'O'          option string of the form NAME=VALUE,...
>   *              parsed according to QemuOptsList given by its name
>   *              Example: 'device:O' uses qemu_device_opts.
> + *              Command completion for specific keys can be requested via
> + *              appending '(NAME:TYPE,...)' with 'F', 'B' as type.
> + *              Example: 'device:O(bus:Q)' to expand 'bus=...' as qtree path.
>   *              Restriction: only lists with empty desc are supported
>   *              TODO lift the restriction
>   * 'i'          32 bit integer

Ugh.

Replacement of args_type by a proper data structure is long overdue.  We
keep piling features into that poor, hapless string.

Information on how to complete QemuOptsList options arguably belongs
into the option description, i.e. QemuOptDesc.

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]