diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 15 | ||||
-rw-r--r-- | migration/savevm.c | 10 |
2 files changed, 10 insertions, 15 deletions
diff --git a/migration/migration.c b/migration/migration.c index ed11c1fb53..0304c013f3 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1143,21 +1143,6 @@ void migrate_del_blocker(Error *reason) migration_blockers = g_slist_remove(migration_blockers, reason); } -int check_migratable(Object *obj, Error **err) -{ - DeviceClass *dc = DEVICE_GET_CLASS(obj); - if (only_migratable && dc->vmsd) { - if (dc->vmsd->unmigratable) { - error_setg(err, "Device %s is not migratable, but " - "--only-migratable was specified", - object_get_typename(obj)); - return -1; - } - } - - return 0; -} - void qmp_migrate_incoming(const char *uri, Error **errp) { Error *local_err = NULL; diff --git a/migration/savevm.c b/migration/savevm.c index b4f736f5f7..f5e81948e6 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2317,3 +2317,13 @@ void vmstate_register_ram_global(MemoryRegion *mr) { vmstate_register_ram(mr, NULL); } + +bool vmstate_check_only_migratable(const VMStateDescription *vmsd) +{ + /* check needed if --only-migratable is specified */ + if (!only_migratable) { + return true; + } + + return !(vmsd && vmsd->unmigratable); +} |