diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-03-19 09:53:29 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-03-19 09:53:29 +0000 |
commit | 54281eefc2597d5452720ca88a9b9c96574e1195 (patch) | |
tree | 18835552a61d81d297225b7f0533fe3be0deb9e8 /qapi | |
parent | 082c0543baa6f237704c83a51658bd7f6ae316d5 (diff) | |
parent | 4eaca8de268d74ac5daaf8938abcb69d37ba2889 (diff) | |
download | qemu-54281eefc2597d5452720ca88a9b9c96574e1195.zip qemu-54281eefc2597d5452720ca88a9b9c96574e1195.tar.gz qemu-54281eefc2597d5452720ca88a9b9c96574e1195.tar.bz2 |
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2019-03-18-tag' into staging
qemu-ga patch queue for 4.0
* fix w32 build breakages with VSS enabled
* fix PCI topology reporting for Windows
* fix OS version reporting for Windows
* add systemd info to qga schema documentation
* add proper 'id' handling to QGA so it conforms to QMP spec
# gpg: Signature made Mon 18 Mar 2019 16:20:32 GMT
# gpg: using RSA key CEACC9E15534EBABB82D3FA03353C9CEF108B584
# gpg: issuer "mdroth@linux.vnet.ibm.com"
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>" [full]
# gpg: aka "Michael Roth <mdroth@utexas.edu>" [full]
# gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>" [full]
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D 3FA0 3353 C9CE F108 B584
* remotes/mdroth/tags/qga-pull-2019-03-18-tag:
qmp: common 'id' handling & make QGA conform to QMP spec
qga: process_event() simplification
qga: Fix guest-get-fsinfo PCI address collection in Windows
qga-win: fix VSS build breakage due to unintended gnu99 C++ flag
qga-win: include glib when building VSS DLL
qga-win: Adding support for Windows Server 2019 get-osinfo command
qga: update docs with systemd suspend support info
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/qmp-dispatch.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 1d922e0..5f812bb 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -58,6 +58,8 @@ static QDict *qmp_dispatch_check_obj(const QObject *request, bool allow_oob, "QMP input member 'arguments' must be an object"); return NULL; } + } else if (!strcmp(arg_name, "id")) { + continue; } else { error_setg(errp, "QMP input member '%s' is unexpected", arg_name); @@ -165,11 +167,11 @@ QDict *qmp_dispatch(QmpCommandList *cmds, QObject *request, bool allow_oob) { Error *err = NULL; - QObject *ret; + QDict *dict = qobject_to(QDict, request); + QObject *ret, *id = dict ? qdict_get(dict, "id") : NULL; QDict *rsp; ret = do_qmp_dispatch(cmds, request, allow_oob, &err); - if (err) { rsp = qmp_error_response(err); } else if (ret) { @@ -180,5 +182,9 @@ QDict *qmp_dispatch(QmpCommandList *cmds, QObject *request, rsp = NULL; } + if (rsp && id) { + qdict_put_obj(rsp, "id", qobject_ref(id)); + } + return rsp; } |