Hi, Here are the follow up patches to the block QAPI extractions patches. After this patchset the qemu-nbd command has a -qmp parameters allowing the user to execute block related qmp commands.
Best regards Benoît Benoît Canet (24): qmp: Extract system emulation related code from qmp.c into qmp-system.c monitor: Make some function public monitor: Extract monitor-system.h header monitor: Make monitor_fprintf public before extracting it monitor: Extract monitor_fprintf to monitor-system.c monitor: Extract qmp_human_monitor_command into monitor-system.c monitor: Make some function to extract public monitor: Extract a couple of function to monitor-system.c monitor: Make do_info_help public monitor: Extract do_info_help in monitor-system.c monitor: Make some monitor functions public before moving them in monitor-system.c monitor: Make do_loadvm public before moving it to monitor-system.c monitor: Move do_loadvm from monitor.c to monitor-system.c monitor: Make commands public before moving them to monitor-system.c monitor: Move mon_cmd_t arrays and some function from monitor.c to monitor-system.c monitor: Move more functions from monitor.c to monitor-system.c monitor: Move two net functions from monitor.c to monitor-system.c monitor: Move qmp_rtc_reset_reinjection from monitor.c to monitor-system.c monitor-system: Switch back functions to static monitor: Extract hardware dependent completion function from monitor.c to monitor-system.c monitor: Cleanup monitor.c includes after extracting monitor-system.c qemu-nbd: build QAPI block core into qemu-nbd qapi: Add a script to filter qmp-commands-old.h to generate a subset of it. qemu-nbd: Add --qmp option to qemu-nbd. Makefile | 40 +- Makefile.objs | 15 +- Makefile.target | 1 + block/Makefile.objs | 11 +- include/monitor/monitor-init.h | 34 + include/monitor/monitor-system.h | 99 + include/monitor/monitor.h | 10 + monitor-init.c | 121 + monitor-system.c | 2806 ++++++++++++++++++++++ monitor.c | 3467 +++------------------------ qapi/Makefile.objs | 2 + qemu-nbd.c | 33 +- qmp-system.c | 376 +++ qmp.c | 361 +-- qobject/Makefile.objs | 2 + qom/Makefile.objs | 8 +- scripts/filter_qmp_commands_old.py | 93 + stubs/Makefile.objs | 15 + stubs/arch-type.c | 3 + stubs/autostart.c | 1 + stubs/cpus-list.c | 3 + stubs/get-double.c | 8 + stubs/get-expr.c | 8 + stubs/kvm-allowed.c | 3 + stubs/kvm-cpu-synchronize-post-init.c | 5 + stubs/kvm-cpu-synchronize-state.c | 5 + stubs/qemu-add-machine-init-done-notifier.c | 5 + stubs/qemu-chr-open-msmouse.c | 7 + stubs/runstate-is-running.c | 6 + stubs/serial-hds.c | 3 + stubs/vmstate-info-buffer.c | 8 + stubs/vmstate-info-uint32.c | 8 + util/Makefile.objs | 2 + vl.c | 88 +- 34 files changed, 4058 insertions(+), 3599 deletions(-) create mode 100644 include/monitor/monitor-init.h create mode 100644 include/monitor/monitor-system.h create mode 100644 monitor-init.c create mode 100644 monitor-system.c create mode 100644 qmp-system.c create mode 100755 scripts/filter_qmp_commands_old.py create mode 100644 stubs/arch-type.c create mode 100644 stubs/autostart.c create mode 100644 stubs/cpus-list.c create mode 100644 stubs/get-double.c create mode 100644 stubs/get-expr.c create mode 100644 stubs/kvm-allowed.c create mode 100644 stubs/kvm-cpu-synchronize-post-init.c create mode 100644 stubs/kvm-cpu-synchronize-state.c create mode 100644 stubs/qemu-add-machine-init-done-notifier.c create mode 100644 stubs/qemu-chr-open-msmouse.c create mode 100644 stubs/runstate-is-running.c create mode 100644 stubs/serial-hds.c create mode 100644 stubs/vmstate-info-buffer.c create mode 100644 stubs/vmstate-info-uint32.c -- 2.0.1