On 03/19/2012 09:09 AM, Anthony Liguori wrote:
> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
> ---
>  qapi-schema.json |   66 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  qemu-config.c    |   51 +++++++++++++++++++++++++++++++++++++++++
>  qmp-commands.hx  |    5 ++++
>  3 files changed, 122 insertions(+), 0 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 04fa84f..2a80ef6 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -1663,3 +1663,69 @@
>  { 'command': 'qom-list-types',
>    'data': { '*implements': 'str', '*abstract': 'bool' },
>    'returns': [ 'ObjectTypeInfo' ] }
> +
> +##
> +# @ConfigOptionType
> +#
> +# An enumeration describing the type of a configuration file entry.
> +#
> +# @string: a UTF-8 string
> +#
> +# @bool: either 'on' or 'off'
> +#
> +# @number: an integer
> +#
> +# @size: an integer followed by either 'K', 'M', 'G', or 'T'.

Not quite - I found three different parsers, but none of them match this
description.  That is, qemu-option.c:parse_option_size() supports 'k'
and 'b', as well as omitting a suffix, but does not support 'm'.  Then
there's cmd.c:cvtnum(), which is case-insensitive, and adds 'p' and 'e',
but omits 'b'.  Then there's the 'o' type in monitor.c that defers to
cutils.c:strtosz(), which defaults to bytes but is case-insensitive and
supports 'b' but not 'p'.  Why are we using three different parsers, anyway?

Please be sure that your documentation exactly matches the code used by
the particular parser used for 'size', since it is is already confusing
as-is.

> +#
> +# @help: an optional help description.  This should not be parsed or relied 
> upon
> +#        in any way.  Its content's may change in future versions of QEMU.

s/content's/contents/

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to