aboutsummaryrefslogtreecommitdiff
path: root/qga/guest-agent-command-state.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-07-12 14:24:48 +0100
committerKonstantin Kostiuk <kkostiuk@redhat.com>2024-07-19 11:50:35 +0300
commit83a7a1ab9af79396831fbb6df510c91e51d1d174 (patch)
tree32efe0c9dd50257d5538d5115aec4a8b4c12d56c /qga/guest-agent-command-state.c
parentf8edff9b779bc39e71a832ad0b7d32184b057b5d (diff)
qga: conditionalize schema for commands requiring linux/win32
Some commands were blocked based on CONFIG_FSFREEZE, but their impl had nothing todo with CONFIG_FSFREEZE, and were instead either Linux-only, or Win+Linux-only. 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 stats and fsinfo commands on platforms that can't support them. 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. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Message-ID: <20240712132459.3974109-12-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'qga/guest-agent-command-state.c')
0 files changed, 0 insertions, 0 deletions