[PATCH 3/3] qemuSnapshotFSFreeze: Don't return -2

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

 



The -2 value is misleading because if 'qemuAgentFSFreeze' fails it
doesn't necessarily mean that the command was sent to the agent.

Since callers don't care about the -2 value specifically, remove it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_snapshot.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index eacc8c6400..93b74b035a 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -119,9 +119,6 @@ qemuSnapshotCountExternal(void *payload,
 }


-/* Return -1 if request is not sent to agent due to misconfig, -2 if request
- * is sent but failed, and number of frozen filesystems on success. If -2 is
- * returned, FSThaw should be called revert the quiesced status. */
 int
 qemuSnapshotFSFreeze(virDomainObjPtr vm,
                      const char **mountpoints,
@@ -136,7 +133,7 @@ qemuSnapshotFSFreeze(virDomainObjPtr vm,
     agent = qemuDomainObjEnterAgent(vm);
     frozen = qemuAgentFSFreeze(agent, mountpoints, nmountpoints);
     qemuDomainObjExitAgent(vm, agent);
-    return frozen < 0 ? -2 : frozen;
+    return frozen;
 }


-- 
2.29.2




[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