Patchwork [19/19] migration: add a parser to accept FT migration incoming mode.

login
register
mail settings
Submitter Yoshiaki Tamura
Date Jan. 11, 2011, 10:59 a.m.
Message ID <1294743594-19193-20-git-send-email-tamura.yoshiaki@lab.ntt.co.jp>
Download mbox | patch
Permalink /patch/78325/
State New
Headers show

Comments

Yoshiaki Tamura - Jan. 11, 2011, 10:59 a.m.
The option looks like, -incoming <protocol>:<address>:<port>,ft_mode

Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
---
 migration.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

Patch

diff --git a/migration.c b/migration.c
index 6e22d2a..4aa7fdf 100644
--- a/migration.c
+++ b/migration.c
@@ -42,9 +42,16 @@  static MigrationState *current_migration;
 
 int qemu_start_incoming_migration(const char *uri)
 {
-    const char *p;
+    const char *p = uri;
     int ret;
 
+    /* check ft_mode option  */
+    if ((p = strstr(p, "ft_mode"))) {
+        if (!strcmp(p, "ft_mode")) {
+            ft_mode = FT_INIT;
+        }
+    }
+
     if (strstart(uri, "tcp:", &p))
         ret = tcp_start_incoming_migration(p);
 #if !defined(WIN32)