From: Peter Krempa Date: Thu, 20 Mar 2025 15:17:23 +0000 (+0100) Subject: qemuAgentCheckError: Use 'VIR_ERR_AGENT_COMMAND_FAILED' X-Git-Tag: v11.2.0-rc1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b38d66e81e8906e0e5b490e8a2dcebc43c137179;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index b22c9d7e85..d4eb4897a4 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -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));