qmp: Extract system emulation related code from qmp.c into qmp-system.c

This patch will allow to link qmp.o with utility binaries without dragging too
much unrelated object files and externals dependencies.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Make some function public

Next commits will split monitor.c in monitor.c and monitor-system.c.

Change some function from static to public in order to prepare this.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Extract monitor-system.h header

This header will allow to split monitor in two parts.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Make monitor_fprintf public before extracting it

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Extract monitor_fprintf to monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Extract qmp_human_monitor_command into monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Make some function to extract public

The functions made public are: help_cmd, do_help_cmd, do_trace_event_set_state
and do_trace_file.

Put the header declaration in monitor/monitor-system.h directly to avoid a
type conflict.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Extract a couple of function to monitor-system.c

The extracted function are help_cmd, do_help_cmd, do_trace_event_set_state,
and do_trace_file.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Make do_info_help public

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Extract do_info_help in monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Make some monitor functions public before moving them in monitor-system.c

This will allow monitor.c to access these functions once they are moved in
monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Make do_loadvm public before moving it to monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Move do_loadvm from monitor.c to monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Make commands public before moving them to monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Move mon_cmd_t arrays and some function from monitor.c to monitor-system.c

Also add sizeof variables for mon_cmd_t arrays for cross modules usage.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Move more functions from monitor.c to monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Move two net functions from monitor.c to monitor-system.c

With this move the monitor.c/monitor-system.c split is complete.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Move qmp_rtc_reset_reinjection from monitor.c to monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor-system: Switch back functions to static

The move from monitor.c to monitor-system.c is done these functions no longer
needs to be public.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
monitor: Extract hardware dependent completion function from monitor.c to monitor-system.c

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>