Kevin Wolf <kw...@redhat.com> writes: > Move the monitor core infrastructure from monitor/misc.c to > monitor/monitor.c. This is code that can be shared for all targets, so > compile it only once. > > What remains in monitor/misc.c after this patch is mostly monitor > command implementations (which could move to hmp-cmds.c or qmp-cmds.c > later) and code that requires a system emulator or is even > target-dependent (including HMP command completion code). > > The amount of function and particularly extern variables in > monitor_int.h is probably a bit larger than it needs to be, but this way > no non-trivial code modifications are needed. The interfaces between all > monitor parts can be cleaned up later. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> [...] > diff --git a/monitor/monitor.c b/monitor/monitor.c > new file mode 100644 > index 0000000000..6802b8e491 > --- /dev/null > +++ b/monitor/monitor.c > @@ -0,0 +1,637 @@ [...] > +QemuOptsList qemu_mon_opts = { > + .name = "mon", > + .implied_opt_name = "chardev", > + .head = QTAILQ_HEAD_INITIALIZER(qemu_mon_opts.head), > + .desc = { > + { > + .name = "mode", > + .type = QEMU_OPT_STRING, > + },{ > + .name = "chardev", > + .type = QEMU_OPT_STRING, > + },{ > + .name = "pretty", > + .type = QEMU_OPT_BOOL, > + }, > + { /* end of list */ }
checkpatch.pl gripes: WARNING: Block comments use a leading /* on a separate line I agree with ignoring this one, because it's the way it looks everywhere. > + }, > +}; [...] Reviewed-by: Markus Armbruster <arm...@redhat.com>