@@ -94,4 +94,11 @@ int migrate_add_blocker_normal(Error **reasonp, Error **errp);
*/
int migrate_add_blocker_modes(Error **reasonp, Error **errp, MigMode mode, ...);
+/**
+ * @migrate_add_blocker_mode - prevent a mode of migration from proceeding
+ *
+ * Like migrate_add_blocker_modes, but for a single mode.
+ */
+int migrate_add_blocker_mode(Error **reasonp, MigMode mode, Error **errp);
+
#endif
@@ -1769,6 +1769,11 @@ int migrate_add_blocker_normal(Error **reasonp, Error **errp)
return migrate_add_blocker_modes(reasonp, errp, MIG_MODE_NORMAL, -1);
}
+int migrate_add_blocker_mode(Error **reasonp, MigMode mode, Error **errp)
+{
+ return migrate_add_blocker_modes(reasonp, errp, mode, -1);
+}
+
int migrate_add_blocker_modes(Error **reasonp, Error **errp, MigMode mode, ...)
{
int modes;
@@ -16,6 +16,11 @@ int migrate_add_blocker_modes(Error **reasonp, Error **errp, MigMode mode, ...)
return 0;
}
+int migrate_add_blocker_mode(Error **reasonp, MigMode mode, Error **errp)
+{
+ return 0;
+}
+
void migrate_del_blocker(Error **reasonp)
{
}
Define a convenience function to add a migration blocker for a single mode. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> --- include/migration/blocker.h | 7 +++++++ migration/migration.c | 5 +++++ stubs/migr-blocker.c | 5 +++++ 3 files changed, 17 insertions(+)