mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
a193352ff9
commit
cee32796ca
4 changed files with 15 additions and 22 deletions
|
@ -47,7 +47,7 @@ void qmp_enable_command(QmpCommandList *cmds, const char *name);
|
|||
bool qmp_command_is_enabled(const QmpCommand *cmd);
|
||||
const char *qmp_command_name(const QmpCommand *cmd);
|
||||
bool qmp_has_success_response(const QmpCommand *cmd);
|
||||
QObject *qmp_build_error_object(Error *err);
|
||||
QDict *qmp_error_response(Error *err);
|
||||
QObject *qmp_dispatch(QmpCommandList *cmds, QObject *request,
|
||||
bool allow_oob);
|
||||
bool qmp_is_oob(QDict *dict);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue