提交 22a0e04b 编写于 作者: G Gerd Hoffmann 提交者: Anthony Liguori

add new -mon switch

Add -mon switch which maps pretty straight forward into the QemuOpts
internal representation:

  -mon chardev=<name>[,mode=[control|readline]][,[no]default]

Via config file:

[mon]
   chardev = "<name>"
   mode = "readline"
   default = "on"
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 88589343
......@@ -1589,6 +1589,13 @@ The default device is @code{vc} in graphical mode and @code{stdio} in
non graphical mode.
ETEXI
DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
"-mon chardev=[name][,mode=readline|control][,default]\n")
STEXI
@item -mon chardev=[name][,mode=readline|control][,default]
Setup monitor on chardev @var{name}.
ETEXI
DEF("pidfile", HAS_ARG, QEMU_OPTION_pidfile, \
"-pidfile file write PID to 'file'\n")
STEXI
......
......@@ -5284,6 +5284,14 @@ int main(int argc, char **argv, char **envp)
monitor_parse(optarg);
default_monitor = 0;
break;
case QEMU_OPTION_mon:
opts = qemu_opts_parse(&qemu_mon_opts, optarg, "chardev");
if (!opts) {
fprintf(stderr, "parse error: %s\n", optarg);
exit(1);
}
default_monitor = 0;
break;
case QEMU_OPTION_chardev:
opts = qemu_opts_parse(&qemu_chardev_opts, optarg, "backend");
if (!opts) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册