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 <kra...@redhat.com> > --- > 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
signature.asc
Description: OpenPGP digital signature