Patchwork [v3,04/11] savevm: add error parameter to qemu_savevm_state_iterate()

login
register
mail settings
Submitter Pavel Hrdina
Date March 28, 2013, 4:47 p.m.
Message ID <8740ef658400588fe8f6ffbb543fd8504eb65b16.1364487348.git.phrdina@redhat.com>
Download mbox | patch
Permalink /patch/232132/
State New
Headers show

Comments

Pavel Hrdina - March 28, 2013, 4:47 p.m.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 include/sysemu/sysemu.h | 2 +-
 migration.c             | 2 +-
 savevm.c                | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 2f35a05..af4f699 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -76,7 +76,7 @@  bool qemu_savevm_state_blocked(Error **errp);
 void qemu_savevm_state_begin(QEMUFile *f,
                              const MigrationParams *params,
                              Error **errp);
-int qemu_savevm_state_iterate(QEMUFile *f);
+int qemu_savevm_state_iterate(QEMUFile *f, Error **errp);
 void qemu_savevm_state_complete(QEMUFile *f);
 void qemu_savevm_state_cancel(void);
 uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size);
diff --git a/migration.c b/migration.c
index d517dd6..e9d2f40 100644
--- a/migration.c
+++ b/migration.c
@@ -516,7 +516,7 @@  static void *migration_thread(void *opaque)
             pending_size = qemu_savevm_state_pending(s->file, max_size);
             DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
             if (pending_size && pending_size >= max_size) {
-                qemu_savevm_state_iterate(s->file);
+                qemu_savevm_state_iterate(s->file, NULL);
             } else {
                 DPRINTF("done iterating\n");
                 qemu_mutex_lock_iothread();
diff --git a/savevm.c b/savevm.c
index 56da096..575f1b2 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1784,7 +1784,7 @@  void qemu_savevm_state_begin(QEMUFile *f,
  *   0 : We haven't finished, caller have to go again
  *   1 : We have finished, we can go to complete phase
  */
-int qemu_savevm_state_iterate(QEMUFile *f)
+int qemu_savevm_state_iterate(QEMUFile *f, Error **errp)
 {
     SaveStateEntry *se;
     int ret = 1;
@@ -1926,7 +1926,7 @@  static int qemu_savevm_state(QEMUFile *f)
     qemu_mutex_lock_iothread();
 
     while (qemu_file_get_error(f) == 0) {
-        if (qemu_savevm_state_iterate(f) > 0) {
+        if (qemu_savevm_state_iterate(f, NULL) > 0) {
             break;
         }
     }