On 01/31/2014 03:35 AM, Martin Kletzander wrote:
> Introduce 'query-chardev-backends' QMP command which lists all
> supported character device backends.
> 
> Signed-off-by: Martin Kletzander <mklet...@redhat.com>
> ---
>  qapi-schema.json | 22 ++++++++++++++++++++++
>  qemu-char.c      | 19 +++++++++++++++++++
>  qmp-commands.hx  | 41 +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 82 insertions(+)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 05ced9d..ac1061f 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -437,6 +437,28 @@
>  { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
> 
>  ##
> +# @ChardevBackendInfo:
> +#
> +# Information about a character device backend
> +#
> +# @name: The backend name
> +#
> +# Since: 1.8.0

2.0 will be the next release.

> +##
> +{ 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
> +
> +##
> +# @query-chardev-backends:
> +#
> +# Returns information about character device backends.
> +#
> +# Returns: a list of @ChardevBackendInfo
> +#
> +# Since: 1.8.0

Again, 2.0.


> +
> +-> { "execute": "query-chardev-backends" }
> +<- {
> +      "return":[
> +         {
> +            "name":"udp",
> +         },

This is somewhat complex, but allows us the option of future addition of
other items to return in addition to the name, if it proves useful
(returning a straight array of strings instead of an array of structs
prevents such future expansion).  So I think you made the right choice.

With the fixes to the version number:

Reviewed-by: Eric Blake <ebl...@redhat.com>

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to