qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 04/11] chardev: add qmp hotplug commands, with n


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 04/11] chardev: add qmp hotplug commands, with null chardev support
Date: Wed, 09 Jan 2013 10:14:45 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 01/07/2013 06:55 AM, Gerd Hoffmann wrote:
> Add chardev-add and chardev-remove qmp commands.  Hotplugging
> a null chardev is supported for now, more will be added later.
> 
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
>  qapi-schema.json |   32 ++++++++++++++++++++++++++++++++
q>  qemu-char.c      |   39 +++++++++++++++++++++++++++++++++++++++
>  qmp-commands.hx  |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 121 insertions(+), 0 deletions(-)

> +##
> +# @chardev-add:
> +#
> +# Add a file chardev
> +#
> +# @id: the chardev's ID, must be unique
> +# @backend: backend type and parameters
> +#
> +# Returns: Nothing on success
> +#
> +# Since: 1.4
> +##
> +{ 'type': 'ChardevDummy', 'data': { } }
> +
> +{ 'union': 'ChardevBackend', 'data': { 'null' : 'ChardevDummy' } }

Don't we usually document types independently from their usage, so that
they aren't appearing in between the documentation for chardev-add and
its actual implementation?

> +
> +{ 'command': 'chardev-add', 'data': {'id'      : 'str',
> +                                     'backend' : 'ChardevBackend' } }
> +

> +SQMP
> +chardev-add
> +----------------
> +
> +Add a chardev.
> +
> +Arguments:
> +
> +- "id": the chardev's ID, must be unique (json-string)
> +- "backend": chardev backend type + parameters
> +
> +Example:
> +
> +-> { "execute"   : "chardev-add",
> +     "arguments" : { "id"   : "foo",
> +                     FIXME } }
> +<- { "return": {} }

Let's get that FIXME dealt with:

-> { "execute" : "chardev-add",
     "arguments" : { "id" : "foo",
                     "backend" : { "type" : "null" } } }
<- { "return": {} }

if I'm reading the spec correctly.  Or does it have to be more verbose?

-> { "execute" : "chardev-add",
     "arguments" : { "id" : "foo",
                     "backend" : { "type" : "null", "data" : {} } } }
<- { "return": {} }

-- 
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

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