qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [patch 1/7] add migration_active function


From: Marcelo Tosatti
Subject: [Qemu-devel] [patch 1/7] add migration_active function
Date: Mon, 23 May 2011 18:31:16 -0300
User-agent: quilt/0.48-1

To query whether migration is active.

Signed-off-by: Marcelo Tosatti <address@hidden>

Index: qemu-block-copy/migration.c
===================================================================
--- qemu-block-copy.orig/migration.c
+++ qemu-block-copy/migration.c
@@ -480,3 +480,13 @@ int get_migration_state(void)
         return MIG_STATE_ERROR;
     }
 }
+
+bool migration_active(void)
+{
+    if (current_migration &&
+        current_migration->get_status(current_migration) == MIG_STATE_ACTIVE) {
+        return true;
+    }
+
+    return false;
+}
Index: qemu-block-copy/migration.h
===================================================================
--- qemu-block-copy.orig/migration.h
+++ qemu-block-copy/migration.h
@@ -148,4 +148,6 @@ int ram_load(QEMUFile *f, void *opaque, 
 
 extern int incoming_expected;
 
+bool migration_active(void);
+
 #endif





reply via email to

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