mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
migration: Remove MigrationState parameter from migration_is_idle()
Only user don't have a MigrationState handly. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
352b0de982
commit
fab3500526
2 changed files with 4 additions and 6 deletions
|
@ -1075,11 +1075,9 @@ bool migration_in_postcopy_after_devices(MigrationState *s)
|
|||
return migration_in_postcopy() && s->postcopy_after_devices;
|
||||
}
|
||||
|
||||
bool migration_is_idle(MigrationState *s)
|
||||
bool migration_is_idle(void)
|
||||
{
|
||||
if (!s) {
|
||||
s = migrate_get_current();
|
||||
}
|
||||
MigrationState *s = migrate_get_current();
|
||||
|
||||
switch (s->state) {
|
||||
case MIGRATION_STATUS_NONE:
|
||||
|
@ -1144,7 +1142,7 @@ int migrate_add_blocker(Error *reason, Error **errp)
|
|||
return -EACCES;
|
||||
}
|
||||
|
||||
if (migration_is_idle(NULL)) {
|
||||
if (migration_is_idle()) {
|
||||
migration_blockers = g_slist_prepend(migration_blockers, reason);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue