mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05: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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user