qemu/util
Markus Armbruster 485febc6d1 qmp: Wean off qerror_report()
The traditional QMP command handler interface

    int qmp_FOO(Monitor *mon, const QDict *params, QObject **ret_data);

doesn't provide for returning an Error object.  Instead, the handler
is expected to stash it in the monitor with qerror_report().

When we rebased QMP on top of QAPI, we didn't change this interface.
Instead, commit 776574d introduced "middle mode" as a temporary aid
for converting existing QMP commands to QAPI one by one.  More than
three years later, we're still using it.

Middle mode has two effects:

* Instead of the native input marshallers

      static void qmp_marshal_input_FOO(QDict *, QObject **, Error **)

  it generates input marshallers conforming to the traditional QMP
  command handler interface.

* It suppresses generation of code to register them with
  qmp_register_command()

  This permits giving them internal linkage.

As long as we need qmp-commands.hx, we can't use the registry behind
qmp_register_command(), so the latter has to stay for now.

The former has to go to get rid of qerror_report().  Changing all QMP
commands to fit the QAPI mold in one go was impractical back when we
started, but by now there are just a few stragglers left:
do_qmp_capabilities(), qmp_qom_set(), qmp_qom_get(), qmp_object_add(),
qmp_netdev_add(), do_device_add().

Switch middle mode to generate native input marshallers, and adapt the
stragglers.  Simplifies both the monitor code and the stragglers.

Rename do_qmp_capabilities() to qmp_capabilities(), and
do_device_add() to qmp_device_add, because that's how QMP command
handlers are named today.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
2015-06-22 18:20:40 +02:00
..
acl.c acl: fix memory leak 2014-11-17 11:48:56 +01:00
aes.c aes: remove a dead return statement 2015-02-10 09:27:20 +03:00
bitmap.c bitmap: add atomic test and clear 2015-06-05 17:10:00 +02:00
bitops.c
compatfd.c util: Remove unused functions 2015-04-30 16:05:48 +03:00
crc32c.c
cutils.c cutils: refine strtol error handling in parse_debug_env 2015-03-10 08:15:33 +03:00
envlist.c utils: drop strtok_r from envlist_parse 2015-02-16 16:20:02 -06:00
error.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00
event_notifier-posix.c event-notifier: Always return 0 for posix implementation 2015-06-12 13:26:21 +01:00
event_notifier-win32.c
fifo8.c
getauxval.c util: Move general qemu_getauxval to util/getauxval.c 2014-09-09 13:13:05 +02:00
hbitmap.c block: Resize bitmaps on bdrv_truncate 2015-04-28 15:36:10 +02:00
hexdump.c
host-utils.c util: Don't link host-utils.o if it's empty 2014-09-09 13:13:05 +02:00
id.c util: Emancipate id_wellformed() from QemuOpts 2014-10-03 10:30:33 +01:00
iov.c util: Use g_new() & friends where that makes obvious sense 2014-12-10 11:34:15 +03:00
Makefile.objs rcu: add rcu library 2015-02-02 16:55:10 +01:00
module.c module: Don't complain when a module is absent 2014-07-18 14:57:35 +02:00
notify.c
osdep.c util: Remove unused functions 2015-04-30 16:05:48 +03:00
oslib-posix.c util: allow \n to terminate password input 2015-05-22 17:08:01 +02:00
oslib-win32.c util: move read_password method out of qemu-img into osdep/oslib 2015-05-22 17:08:01 +02:00
path.c util/path: Use the GLib memory allocation routines 2014-08-24 13:16:32 +04:00
qemu-config.c QemuOpts: increase number of vm_config_groups 2015-06-10 08:00:37 +02:00
qemu-error.c qmp: Wean off qerror_report() 2015-06-22 18:20:40 +02:00
qemu-openpty.c
qemu-option.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
qemu-progress.c
qemu-sockets.c Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler 2015-06-12 13:26:21 +01:00
qemu-thread-posix.c qemu-thread: do not use PTHREAD_MUTEX_ERRORCHECK 2015-03-10 10:49:25 +01:00
qemu-thread-win32.c qemu-thread: add per-thread atexit functions 2015-01-13 13:43:29 +00:00
qemu-timer-common.c
rcu.c rcu: do not create thread in pthread_atfork callback 2015-04-01 10:06:38 +02:00
readline.c
rfifolock.c
throttle.c throttle: Update throttle infrastructure copyright 2015-06-12 14:00:00 +01:00
unicode.c
uri.c util/uri: Add overflow check to rfc3986_parse_port 2015-03-18 12:05:31 +01:00