]> git.ipfire.org Git - thirdparty/qemu.git/commit
qmp: De-duplicate error response building
authorMarkus Armbruster <armbru@redhat.com>
Tue, 3 Jul 2018 08:53:48 +0000 (10:53 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 24 Jul 2018 20:45:47 +0000 (15:45 -0500)
commit08c4a51c65fcde99255d8ab9eabbaefeca5f9250
treeee0086e0e6f59c264188b8d4835d41cdfba79ecc
parent441784598e7cf1695657cd958a5f6e3326da01f9
qmp: De-duplicate error response building

All callers of qmp_build_error_object() duplicate the code to wrap it
in a response object.  Replace it by qmp_error_response() that
captures the duplicated code, including error_free().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180703085358.13941-23-armbru@redhat.com>
(cherry picked from commit cee32796cadc9510ee00f029a933009df7a28ae2)
 Conflicts:
include/qapi/qmp/dispatch.h
qapi/qmp-dispatch.c
qga/main.c
* drop context dep on cb3e7f08ae
* prereq for ae7da1e5f6
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
include/qapi/qmp/dispatch.h
monitor.c
qapi/qmp-dispatch.c
qga/main.c