Patchwork [10/13] savevm: update return value from qemu_savevm_state_begin

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

Comments

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

Patch

diff --git a/savevm.c b/savevm.c
index 930ef65..f204748 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1600,17 +1600,17 @@  int qemu_savevm_state_begin(QEMUFile *f,
         if (ret < 0) {
             qemu_savevm_state_cancel(f);
             error_setg(errp, "Failed to begin vmstate save.");
-            return ret;
+            return -1;
         }
     }
     ret = qemu_file_get_error(f);
     if (ret != 0) {
         error_setg_errno(errp, errno, "Failed to begin vmstate save.");
         qemu_savevm_state_cancel(f);
+        return -1;
     }
 
-    return ret;
-
+    return 0;
 }
 
 /*