diff mbox

[3/4] arch_init: calculate transferred bytes at ram_load().

Message ID 1275406821-30024-4-git-send-email-tamura.yoshiaki@lab.ntt.co.jp
State New
Headers show

Commit Message

Yoshiaki Tamura June 1, 2010, 3:40 p.m. UTC
Currently incoming side of migration doesn't know how many bytes are
transferred.  To print "info migrate" on incoming side, we need to
calculate transferred bytes at ram_load().

Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
---
 arch_init.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch_init.c b/arch_init.c
index cfc03ea..1b4312d 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -277,6 +277,8 @@  int ram_load(QEMUFile *f, void *opaque, int version_id)
         if (qemu_file_has_error(f)) {
             return -EIO;
         }
+
+        bytes_transferred += TARGET_PAGE_SIZE;
     } while (!(flags & RAM_SAVE_FLAG_EOS));
 
     return 0;