mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
migration: Remove MigrationState from migration_in_postcopy
We need to call for the migrate_get_current() in more that half of the uses, so call that inside. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
@@ -1062,14 +1062,16 @@ bool migration_has_failed(MigrationState *s)
|
||||
s->state == MIGRATION_STATUS_FAILED);
|
||||
}
|
||||
|
||||
bool migration_in_postcopy(MigrationState *s)
|
||||
bool migration_in_postcopy(void)
|
||||
{
|
||||
MigrationState *s = migrate_get_current();
|
||||
|
||||
return (s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
|
||||
}
|
||||
|
||||
bool migration_in_postcopy_after_devices(MigrationState *s)
|
||||
{
|
||||
return migration_in_postcopy(s) && s->postcopy_after_devices;
|
||||
return migration_in_postcopy() && s->postcopy_after_devices;
|
||||
}
|
||||
|
||||
bool migration_is_idle(MigrationState *s)
|
||||
|
||||
Reference in New Issue
Block a user