Patchwork [06/18] Monitor: Convert do_info() back to HMP

login
register
mail settings
Submitter Luiz Capitulino
Date Sept. 16, 2010, 8:20 p.m.
Message ID <1284668464-15981-7-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/65001/
State New
Headers show

Comments

Luiz Capitulino - Sept. 16, 2010, 8:20 p.m.
This is a HMP specific handler, it makes no sense to have it
under QMP.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c       |    5 ++---
 qemu-monitor.hx |    3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

Patch

diff --git a/monitor.c b/monitor.c
index 1d52362..ea66ac3 100644
--- a/monitor.c
+++ b/monitor.c
@@ -633,7 +633,7 @@  static void user_async_info_handler(Monitor *mon, const mon_cmd_t *cmd)
     }
 }
 
-static int do_info(Monitor *mon, const QDict *qdict, QObject **ret_data)
+static void do_info(Monitor *mon, const QDict *qdict)
 {
     const mon_cmd_t *cmd;
     const char *item = qdict_get_try_str(qdict, "item");
@@ -665,11 +665,10 @@  static int do_info(Monitor *mon, const QDict *qdict, QObject **ret_data)
         cmd->mhandler.info(mon);
     }
 
-    return 0;
+    return;
 
 help:
     help_cmd(mon, "info");
-    return 0;
 }
 
 static void do_info_version_print(Monitor *mon, const QObject *data)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 49bcd8d..57d28ac 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -1654,8 +1654,7 @@  EQMP
         .args_type  = "item:s?",
         .params     = "[subcommand]",
         .help       = "show various information about the system state",
-        .user_print = monitor_user_noop,
-        .mhandler.cmd_new = do_info,
+        .mhandler.cmd = do_info,
     },
 
 STEXI