diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2024-07-12 14:24:46 +0100 |
---|---|---|
committer | Konstantin Kostiuk <kkostiuk@redhat.com> | 2024-07-19 11:50:35 +0300 |
commit | dacc52461b045148d87606bada5cd24d1ca8c220 (patch) | |
tree | e502b4f6bc3acd8684fc974141b7b6fcbfff852c /module-common.c | |
parent | 0e90127d9b385cca45b48117d4050fd2f57a49ea (diff) | |
download | qemu-dacc52461b045148d87606bada5cd24d1ca8c220.zip qemu-dacc52461b045148d87606bada5cd24d1ca8c220.tar.gz qemu-dacc52461b045148d87606bada5cd24d1ca8c220.tar.bz2 |
qga: conditionalize schema for commands unsupported on non-Linux POSIX
Rather than creating stubs for every command that just return
QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to
fully exclude generation of the commands on non-Linux POSIX
platforms
The command will be rejected at QMP dispatch time instead,
avoiding reimplementing rejection by blocking the stub commands.
This changes the error message for affected commands from
{"class": "CommandNotFound", "desc": "Command FOO has been disabled"}
to
{"class": "CommandNotFound", "desc": "The command FOO has not been found"}
This has the additional benefit that the QGA protocol reference
now documents what conditions enable use of the command.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240712132459.3974109-10-berrange@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'module-common.c')
0 files changed, 0 insertions, 0 deletions