qemu-devel
[Top][All Lists]
Advanced

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

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


From: Marcelo Tosatti
Subject: [Qemu-devel] [patch 1/3] add migration_active function
Date: Tue, 22 Feb 2011 14:00:05 -0300
User-agent: quilt/0.47-1

To query whether migration is active.

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

Index: qemu/migration.c
===================================================================
--- qemu.orig/migration.c
+++ qemu/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/migration.h
===================================================================
--- qemu.orig/migration.h
+++ qemu/migration.h
@@ -139,4 +139,6 @@ void add_migration_state_change_notifier
 void remove_migration_state_change_notifier(Notifier *notify);
 int get_migration_state(void);
 
+bool migration_active(void);
+
 #endif





reply via email to

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