qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 03/18] Introduce skip_header parameter to qemu_l


From: Yoshiaki Tamura
Subject: [Qemu-devel] Re: [PATCH 03/18] Introduce skip_header parameter to qemu_loadvm_state().
Date: Thu, 24 Feb 2011 11:49:54 +0900
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Juan Quintela wrote:
Yoshiaki Tamura<address@hidden>  wrote:
Introduce skip_header parameter to qemu_loadvm_state() so that it can
be called iteratively without reading the header.

Signed-off-by: Yoshiaki Tamura<address@hidden>
---
  migration.c |    2 +-
  savevm.c    |   24 +++++++++++++-----------
  sysemu.h    |    2 +-
  3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/migration.c b/migration.c
index 302b8fe..bd51fef 100644
--- a/migration.c
+++ b/migration.c
@@ -63,7 +63,7 @@ int qemu_start_incoming_migration(const char *uri)

  void process_incoming_migration(QEMUFile *f)
  {
-    if (qemu_loadvm_state(f)<  0) {
+    if (qemu_loadvm_state(f, 0)<  0) {
          fprintf(stderr, "load of migration failed\n");
          exit(0);
      }

I think it would be better to just create a different function

qemu_loadvm_state_internal() (better name)

and that qemu_loadvm_state() just does the other tests and call
qemu_loadvm_state_internal?

Sounds reasonable.  Let me try.

Yoshi



Later, Juan.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]