Patchwork [11/13] savevm: update return value from qemu_savevm_state_complete

login
register
mail settings
Submitter Pavel Hrdina
Date Jan. 9, 2013, 3:18 p.m.
Message ID <6d2cdd401528ee4ac1af2ec28712144336ca56e6.1357741229.git.phrdina@redhat.com>
Download mbox | patch
Permalink /patch/210752/
State New
Headers show

Comments

Pavel Hrdina - Jan. 9, 2013, 3:18 p.m.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 savevm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/savevm.c b/savevm.c
index f204748..f9858cc 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1692,7 +1692,7 @@  int qemu_savevm_state_complete(QEMUFile *f, Error **errp)
         trace_savevm_section_end(se->section_id);
         if (ret < 0) {
             error_setg(errp, "Failed to complete vmstate save.");
-            return ret;
+            return -1;
         }
     }
 
@@ -1724,9 +1724,10 @@  int qemu_savevm_state_complete(QEMUFile *f, Error **errp)
     ret = qemu_file_get_error(f);
     if (ret < 0) {
         error_setg_errno(errp, errno, "Failed to complete vmstate save.");
+        return -1;
     }
 
-    return ret;
+    return 0;
 }
 
 uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)