diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-02 12:34:47 -0500 |
|---|---|---|
| committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-10-04 11:00:46 -0300 |
| commit | e3193601c84558c303b1773379da76fce80c0a56 (patch) | |
| tree | 5b42ffb0cd94b9af76588a27793906e1be599f9b /monitor.c | |
| parent | 776574d6417cf623fb071987cdd2c6bc13271dc2 (diff) | |
| download | focaccia-qemu-e3193601c84558c303b1773379da76fce80c0a56.tar.gz focaccia-qemu-e3193601c84558c303b1773379da76fce80c0a56.zip | |
qapi: use middle mode in QMP server
Use the new middle mode within the existing QMP server. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
| -rw-r--r-- | monitor.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/monitor.c b/monitor.c index d323ea5851..e267d5899c 100644 --- a/monitor.c +++ b/monitor.c @@ -122,6 +122,7 @@ typedef struct mon_cmd_t { int (*cmd_async)(Monitor *mon, const QDict *params, MonitorCompletion *cb, void *opaque); } mhandler; + bool qapi; int flags; } mon_cmd_t; @@ -3182,7 +3183,7 @@ static const mon_cmd_t info_cmds[] = { }; static const mon_cmd_t qmp_cmds[] = { -#include "qmp-commands.h" +#include "qmp-commands-old.h" { /* NULL */ }, }; @@ -5107,12 +5108,10 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens) goto err_out; } - if (strstart(cmd_name, "query-", &query_cmd)) { + cmd = qmp_find_cmd(cmd_name); + if (!cmd && strstart(cmd_name, "query-", &query_cmd)) { cmd = qmp_find_query_cmd(query_cmd); - } else { - cmd = qmp_find_cmd(cmd_name); } - if (!cmd) { qerror_report(QERR_COMMAND_NOT_FOUND, cmd_name); goto err_out; |