mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-30 18:50:18 +03:00
qemuAgentCheckError: Use 'VIR_ERR_AGENT_COMMAND_FAILED'
In the two cases when we know that the command returned failure switch to the new error code so that management applications can programatically detect failure of the guest agent command. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c3a92081c8
commit
b38d66e81e
@ -985,7 +985,7 @@ qemuAgentCheckError(virJSONValue *cmd,
|
||||
|
||||
/* Only send the user the command name + friendly error */
|
||||
if (!error) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_AGENT_COMMAND_FAILED,
|
||||
_("unable to execute QEMU agent command '%1$s'"),
|
||||
qemuAgentCommandName(cmd));
|
||||
return -1;
|
||||
@ -999,7 +999,7 @@ qemuAgentCheckError(virJSONValue *cmd,
|
||||
return -2;
|
||||
}
|
||||
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
virReportError(VIR_ERR_AGENT_COMMAND_FAILED,
|
||||
_("unable to execute QEMU agent command '%1$s': %2$s"),
|
||||
qemuAgentCommandName(cmd),
|
||||
qemuAgentStringifyError(error));
|
||||
|
Loading…
x
Reference in New Issue
Block a user