mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
qga: return a more explicit error on why a command is disabled
qmp_disable_command() now takes an optional error string to return a more explicit error message. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1928806 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> *fix up 80+ char line Signed-off-by: Michael Roth <michael.roth@amd.com>
This commit is contained in:
parent
86dc17d4d0
commit
c98939daec
4 changed files with 15 additions and 9 deletions
|
|
@ -157,8 +157,10 @@ QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request,
|
|||
}
|
||||
if (!cmd->enabled) {
|
||||
error_set(&err, ERROR_CLASS_COMMAND_NOT_FOUND,
|
||||
"The command %s has been disabled for this instance",
|
||||
command);
|
||||
"Command %s has been disabled%s%s",
|
||||
command,
|
||||
cmd->disable_reason ? ": " : "",
|
||||
cmd->disable_reason ?: "");
|
||||
goto out;
|
||||
}
|
||||
if (oob && !(cmd->options & QCO_ALLOW_OOB)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue