[PATCH 6/8] qemuAgentCheckError: Use 'VIR_ERR_AGENT_COMMAND_FAILED'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Peter Krempa <pkrempa@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 src/qemu/qemu_agent.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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));
-- 
2.48.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux