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: Benoit Canet <benoit@irqsave.net>
monitor: Make do_loadvm public before moving it to monitor-system.c

Signed-off-by: Benoit Canet <benoit@irqsave.net>
monitor: Move do_loadvm from monitor.c to monitor-system.c

Signed-off-by: Benoit Canet <benoit@irqsave.net>
monitor: Make commands public before moving them to monitor-system.c

Signed-off-by: Benoit Canet <benoit@irqsave.net>
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: Benoit Canet <benoit@irqsave.net>
monitor: Move more functions from monitor.c to monitor-system.c

Signed-off-by: Benoit Canet <benoit@irqsave.net>
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: Benoit Canet <benoit@irqsave.net>
monitor: Move qmp_rtc_reset_reinjection from monitor.c to monitor-system.c

Signed-off-by: Benoit Canet <benoit@irqsave.net>
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: Benoit Canet <benoit@irqsave.net>
monitor: Extract hardware dependent completion function from monitor.c to monitor-system.c

Signed-off-by: Benoit Canet <benoit@irqsave.net>
monitor: Cleanup monitor.c includes after extracting monitor-system.c

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qemu-nbd: build QAPI block core into qemu-nbd

Compile and link QAPI block core code into qemu-nbd.

This patch circle around unwanted dependecies by stubing some functions in
the stubs directory.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qapi: Add a script to filter qmp-commands-old.h to generate a subset of it.

Since qmp-command-olds.h is generated from qmp-commands.hx we will sometime want
to include only a subset of it. For example when linking qapi block commands
with qemu-nbd.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qemu-nbd: Add --qmp option to qemu-nbd.

This patch add a -qmp parameter to the qemu-nbd command line in order to be able
to manipulate the qemu-nbd block devices via qmp.

This could be used with containers to easily migrate from qemu to a container.

Signed-off-by: Benoit Canet <benoit@irqsave.net>