mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
migration: Move migrate_cap_set() to options.c
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
This commit is contained in:
parent
45c1de13f0
commit
f80196b772
3 changed files with 22 additions and 20 deletions
|
@ -1666,26 +1666,6 @@ void migrate_set_state(int *state, int old_state, int new_state)
|
|||
}
|
||||
}
|
||||
|
||||
static bool migrate_cap_set(int cap, bool value, Error **errp)
|
||||
{
|
||||
MigrationState *s = migrate_get_current();
|
||||
bool new_caps[MIGRATION_CAPABILITY__MAX];
|
||||
|
||||
if (migration_is_running(s->state)) {
|
||||
error_setg(errp, QERR_MIGRATION_ACTIVE);
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(new_caps, s->capabilities, sizeof(new_caps));
|
||||
new_caps[cap] = value;
|
||||
|
||||
if (!migrate_caps_check(s->capabilities, new_caps, errp)) {
|
||||
return false;
|
||||
}
|
||||
s->capabilities[cap] = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void migrate_set_block_incremental(MigrationState *s, bool value)
|
||||
{
|
||||
s->parameters.block_incremental = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue