From: Eric Blake <eblake@redhat.com>
To: Martin Kletzander <mkletzan@redhat.com>, qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qmp: expose list of supported character device backends
Date: Fri, 31 Jan 2014 06:27:10 -0700 [thread overview]
Message-ID: <52EBA4AE.2060207@redhat.com> (raw)
In-Reply-To: <67b869e0b5b500dc4fb8678341ce355a24cc74e7.1391164459.git.mkletzan@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]
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 <mkletzan@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 <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2014-01-31 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 10:35 [Qemu-devel] [PATCH] qmp: expose list of supported character device backends Martin Kletzander
2014-01-31 13:27 ` Eric Blake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52EBA4AE.2060207@redhat.com \
--to=eblake@redhat.com \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mkletzan@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).