aboutsummaryrefslogtreecommitdiff
path: root/target/alpha/sys_helper.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-07-12 14:24:45 +0100
committerKonstantin Kostiuk <kkostiuk@redhat.com>2024-07-19 11:50:35 +0300
commit0e90127d9b385cca45b48117d4050fd2f57a49ea (patch)
tree48eabef5c9796cab8421b87f5dde9c3d2ce6b6fc /target/alpha/sys_helper.c
parent4bb3da4b145b8cb51a71a429c8b7cb6392c0cdcc (diff)
downloadqemu-0e90127d9b385cca45b48117d4050fd2f57a49ea.zip
qemu-0e90127d9b385cca45b48117d4050fd2f57a49ea.tar.gz
qemu-0e90127d9b385cca45b48117d4050fd2f57a49ea.tar.bz2
qga: conditionalize schema for commands unsupported 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 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 also fixes an accidental inconsistency where some commands (guest-get-diskstats & guest-get-cpustats) are implemented as stubs, yet not added to the blockedrpc list. Those change their error message from {"class": "GenericError, "desc": "this feature or command is not currently supported"} to {"class": "CommandNotFound", "desc": "The command FOO has not been found"} The final additional benefit is 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-9-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'target/alpha/sys_helper.c')
0 files changed, 0 insertions, 0 deletions