@@ -68,6 +68,7 @@
#include "monitor/monitor.h"
#include "sysemu/reset.h"
+#include "vl.h"
static ProxyLinkState *proxy_link;
@@ -562,6 +563,8 @@ int main(int argc, char *argv[], char **envp)
module_call_init(MODULE_INIT_QOM);
+ monitor_init_globals();
+
bdrv_init_with_whitelist();
if (qemu_init_main_loop(&err)) {
@@ -577,6 +580,8 @@ int main(int argc, char *argv[], char **envp)
qemu_add_opts(&qemu_device_opts);
qemu_add_opts(&qemu_drive_opts);
+ qemu_add_opts(&qemu_chardev_opts);
+ qemu_add_opts(&qemu_mon_opts);
qemu_add_drive_opts(&qemu_legacy_drive_opts);
qemu_add_drive_opts(&qemu_common_drive_opts);
qemu_add_drive_opts(&qemu_drive_opts);
@@ -609,6 +614,12 @@ int main(int argc, char *argv[], char **envp)
proxy_link_set_callback(proxy_link, process_msg);
+ qemu_opts_foreach(qemu_find_opts("chardev"),
+ chardev_init_func, NULL, &error_fatal);
+
+ qemu_opts_foreach(qemu_find_opts("mon"),
+ mon_init_func, NULL, &error_fatal);
+
start_handler(proxy_link);
return 0;
@@ -95,6 +95,16 @@ void parse_cmdline(int argc, char **argv, char **envp)
exit(1);
}
break;
+ case QEMU_OPTION_qmp:
+ monitor_parse(optarg, "control", false);
+ break;
+ case QEMU_OPTION_monitor:
+ if (!strncmp(optarg, "stdio", 5)) {
+ warn_report("STDIO not supported in remote process");
+ } else if (strncmp(optarg, "none", 4)) {
+ monitor_parse(optarg, "readline", false);
+ }
+ break;
default:
break;
}