aboutsummaryrefslogtreecommitdiff
path: root/module-common.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-07-12 14:24:49 +0100
committerKonstantin Kostiuk <kkostiuk@redhat.com>2024-07-19 11:50:35 +0300
commitdedf99f3032aa2968af55c62a5642ed3648ff58d (patch)
treee5527c7cc3a385ce6c4dbc8a7104d726f02f73e3 /module-common.c
parent83a7a1ab9af79396831fbb6df510c91e51d1d174 (diff)
downloadqemu-dedf99f3032aa2968af55c62a5642ed3648ff58d.zip
qemu-dedf99f3032aa2968af55c62a5642ed3648ff58d.tar.gz
qemu-dedf99f3032aa2968af55c62a5642ed3648ff58d.tar.bz2
qga: conditionalize schema for commands only supported on Windows
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-Windows. 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> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Message-ID: <20240712132459.3974109-13-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'module-common.c')
0 files changed, 0 insertions, 0 deletions