From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, armbru@redhat.com, aliguori@us.ibm.com,
mdroth@linux.vnet.ibm.com, quintela@redhat.com
Subject: [Qemu-devel] [PATCH 18/19] Monitor: do_info(): Drop QMP command handling code
Date: Mon, 24 Oct 2011 11:27:11 -0200 [thread overview]
Message-ID: <1319462832-12199-19-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1319462832-12199-1-git-send-email-lcapitulino@redhat.com>
Previous commits converted all existing QMP commands to the QAPI,
now each info command does its own QMP call.
Let's then drop all QMP command handling code from do_info().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
monitor.c | 32 +-------------------------------
1 files changed, 1 insertions(+), 31 deletions(-)
diff --git a/monitor.c b/monitor.c
index 1e09b91..e3c7d0d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -123,8 +123,6 @@ typedef struct mon_cmd_t {
void (*user_print)(Monitor *mon, const QObject *data);
union {
void (*info)(Monitor *mon);
- void (*info_new)(Monitor *mon, QObject **ret_data);
- int (*info_async)(Monitor *mon, MonitorCompletion *cb, void *opaque);
void (*cmd)(Monitor *mon, const QDict *qdict);
int (*cmd_new)(Monitor *mon, const QDict *params, QObject **ret_data);
int (*cmd_async)(Monitor *mon, const QDict *params,
@@ -679,21 +677,6 @@ static void user_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd,
}
}
-static void user_async_info_handler(Monitor *mon, const mon_cmd_t *cmd)
-{
- int ret;
-
- MonitorCompletionData *cb_data = g_malloc(sizeof(*cb_data));
- cb_data->mon = mon;
- cb_data->user_print = cmd->user_print;
- monitor_suspend(mon);
- ret = cmd->mhandler.info_async(mon, user_monitor_complete, cb_data);
- if (ret < 0) {
- monitor_resume(mon);
- g_free(cb_data);
- }
-}
-
static void do_info(Monitor *mon, const QDict *qdict)
{
const mon_cmd_t *cmd;
@@ -712,20 +695,7 @@ static void do_info(Monitor *mon, const QDict *qdict)
goto help;
}
- if (handler_is_async(cmd)) {
- user_async_info_handler(mon, cmd);
- } else if (handler_is_qobject(cmd)) {
- QObject *info_data = NULL;
-
- cmd->mhandler.info_new(mon, &info_data);
- if (info_data) {
- cmd->user_print(mon, info_data);
- qobject_decref(info_data);
- }
- } else {
- cmd->mhandler.info(mon);
- }
-
+ cmd->mhandler.info(mon);
return;
help:
--
1.7.7.1.431.g10b2a
next prev parent reply other threads:[~2011-10-24 13:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 13:26 [Qemu-devel] [PATCH v1 00/19]: QAPI conversions round 2 Luiz Capitulino
2011-10-24 13:26 ` [Qemu-devel] [PATCH 01/19] qapi-commands.py: Don't call the output marshal on error Luiz Capitulino
2011-10-24 13:26 ` [Qemu-devel] [PATCH 02/19] qapi: Convert query-mice Luiz Capitulino
2011-10-24 13:26 ` [Qemu-devel] [PATCH 03/19] qapi: Convert query-migrate Luiz Capitulino
2011-10-24 13:26 ` [Qemu-devel] [PATCH 04/19] Monitor: Make mon_set_cpu() public Luiz Capitulino
2011-10-24 13:26 ` [Qemu-devel] [PATCH 05/19] Monitor: Introduce monitor_get_cpu_index() Luiz Capitulino
2011-10-24 13:26 ` [Qemu-devel] [PATCH 06/19] qapi: Convert the cpu command Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 07/19] qapi: Convert query-cpus Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 08/19] block: iostatus: Drop BDRV_IOS_INVAL Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 09/19] block: Rename the BlockIOStatus enum values Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 10/19] qapi: Convert query-block Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 11/19] qapi: Convert query-blockstats Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 12/19] qerror: Add a user string for QERR_FEATURE_DISABLED Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 13/19] qapi: Convert query-vnc Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 14/19] qapi: Convert query-spice Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 15/19] qapi: Convert query-balloon Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 16/19] qapi: Convert query-pci Luiz Capitulino
2011-10-24 13:27 ` [Qemu-devel] [PATCH 17/19] QMP: Drop the query commands dispatch table Luiz Capitulino
2011-10-24 13:27 ` Luiz Capitulino [this message]
2011-10-24 13:27 ` [Qemu-devel] [PATCH 19/19] Drop qemu-objects.h from modules that don't require it Luiz Capitulino
-- strict thread matches above, loose matches on Subject: below --
2011-10-27 19:01 [Qemu-devel] [PULL 00/19]: QMP queue Luiz Capitulino
2011-10-27 19:02 ` [Qemu-devel] [PATCH 18/19] Monitor: do_info(): Drop QMP command handling code 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=1319462832-12199-19-git-send-email-lcapitulino@redhat.com \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).