aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/monitor.c b/monitor.c
index b68944d93c..53f5f5a378 100644
--- a/monitor.c
+++ b/monitor.c
@@ -997,8 +997,10 @@ static void qmp_unregister_commands_hack(void)
#endif
}
-static void qmp_init_marshal(void)
+void monitor_init_qmp_commands(void)
{
+ qmp_init_marshal();
+
qmp_register_command("query-qmp-schema", qmp_query_qmp_schema,
QCO_NO_OPTIONS);
qmp_register_command("device_add", qmp_device_add,
@@ -1006,12 +1008,9 @@ static void qmp_init_marshal(void)
qmp_register_command("netdev_add", qmp_netdev_add,
QCO_NO_OPTIONS);
- /* call it after the rest of qapi_init() */
- register_module_init(qmp_unregister_commands_hack, MODULE_INIT_QAPI);
+ qmp_unregister_commands_hack();
}
-qapi_init(qmp_init_marshal);
-
/* set the current CPU defined by the user */
int monitor_set_cpu(int cpu_index)
{