From: Anthony Liguori <anthony@codemonkey.ws>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/8] VNC: Use 'enabled' key instead of 'status'
Date: Tue, 19 Jan 2010 16:39:42 -0600 [thread overview]
Message-ID: <4B5634AE.3040800@codemonkey.ws> (raw)
In-Reply-To: <1263487859-6318-2-git-send-email-lcapitulino@redhat.com>
On 01/14/2010 10:50 AM, Luiz Capitulino wrote:
> Currently the 'status' key is a string whose value can be
> "disabled" or "enabled", change it to the QMP's standard
> 'enabled' key, which is a bool.
>
> Note that 'status' in being dropped and this wouldn't be
> allowed if QMP were stable.
>
> Signed-off-by: Luiz Capitulino<lcapitulino@redhat.com>
>
Applied all. Thanks.
Regards,
Anthony Liguori
> ---
> vnc.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/vnc.c b/vnc.c
> index 58eac73..ef86ef7 100644
> --- a/vnc.c
> +++ b/vnc.c
> @@ -254,7 +254,7 @@ void do_info_vnc_print(Monitor *mon, const QObject *data)
> QList *clients;
>
> server = qobject_to_qdict(data);
> - if (strcmp(qdict_get_str(server, "status"), "disabled") == 0) {
> + if (qdict_get_bool(server, "enabled") == 0) {
> monitor_printf(mon, "Server: disabled\n");
> return;
> }
> @@ -282,7 +282,7 @@ void do_info_vnc_print(Monitor *mon, const QObject *data)
> *
> * The main QDict contains the following:
> *
> - * - "status": "disabled" or "enabled"
> + * - "enabled": true or false
> * - "host": server's IP address
> * - "service": server's port number
> * - "auth": authentication method (optional)
> @@ -297,13 +297,13 @@ void do_info_vnc_print(Monitor *mon, const QObject *data)
> *
> * Example:
> *
> - * { "status": "enabled", "host": "0.0.0.0", "service": "50402", "auth": "vnc",
> + * { "enabled": true, "host": "0.0.0.0", "service": "50402", "auth": "vnc",
> * "clients": [ { "host": "127.0.0.1", "service": "50401" } ] }
> */
> void do_info_vnc(Monitor *mon, QObject **ret_data)
> {
> if (vnc_display == NULL || vnc_display->display == NULL) {
> - *ret_data = qobject_from_jsonf("{ 'status': 'disabled' }");
> + *ret_data = qobject_from_jsonf("{ 'enabled': false }");
> } else {
> QDict *qdict;
> QList *clist;
> @@ -319,7 +319,7 @@ void do_info_vnc(Monitor *mon, QObject **ret_data)
> }
> }
>
> - *ret_data = qobject_from_jsonf("{ 'status': 'enabled', 'clients': %p }",
> + *ret_data = qobject_from_jsonf("{ 'enabled': true, 'clients': %p }",
> QOBJECT(clist));
> assert(*ret_data != NULL);
>
>
next prev parent reply other threads:[~2010-01-19 22:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 16:50 [Qemu-devel] [PATCH v0 0/8]: VNC events and cleanup Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 1/8] VNC: Use 'enabled' key instead of 'status' Luiz Capitulino
2010-01-19 22:39 ` Anthony Liguori [this message]
2010-01-14 16:50 ` [Qemu-devel] [PATCH 2/8] VNC: Make 'auth' key mandatory Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 3/8] VNC: Rename client's 'username' key Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 4/8] VNC: Add 'family' key Luiz Capitulino
2010-01-15 7:54 ` Gerd Hoffmann
2010-01-15 11:54 ` Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 5/8] VNC: Cache client info at connection time Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 6/8] QMP: Introduce VNC_CONNECTED event Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 7/8] QMP: Introduce VNC_DISCONNECTED event Luiz Capitulino
2010-01-14 16:50 ` [Qemu-devel] [PATCH 8/8] QMP: Introduce VNC_INITIALIZED event Luiz Capitulino
2010-01-14 17:32 ` [Qemu-devel] Re: [PATCH v0 0/8]: VNC events and cleanup Daniel P. Berrange
2010-01-14 19:01 ` Luiz Capitulino
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=4B5634AE.3040800@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=lcapitulino@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).