diff options
author | Juan Quintela <quintela@redhat.com> | 2010-05-11 15:51:36 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2011-10-20 13:23:53 +0200 |
commit | 2d5a672b509416dd03f42cc7ece898287aaa12b5 (patch) | |
tree | 3ad36995007cdef23b77c790b19135c915a8f54d /migration.c | |
parent | 4d4d3369abf835b1ba6a9b808304913f64d5f155 (diff) | |
download | qemu-2d5a672b509416dd03f42cc7ece898287aaa12b5.tar.gz qemu-2d5a672b509416dd03f42cc7ece898287aaa12b5.tar.bz2 qemu-2d5a672b509416dd03f42cc7ece898287aaa12b5.zip |
migration: Fold MigrationState into FdMigrationState
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/migration.c b/migration.c index e3362b76d8..caa9e03dd1 100644 --- a/migration.c +++ b/migration.c @@ -87,8 +87,7 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data) const char *uri = qdict_get_str(qdict, "uri"); if (current_migration && - current_migration->mig_state.get_status(current_migration) == - MIG_STATE_ACTIVE) { + current_migration->get_status(current_migration) == MIG_STATE_ACTIVE) { monitor_printf(mon, "migration already in progress\n"); return -1; } @@ -122,7 +121,7 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data) } if (current_migration) { - current_migration->mig_state.release(current_migration); + current_migration->release(current_migration); } current_migration = s; @@ -134,8 +133,8 @@ int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data) { FdMigrationState *s = current_migration; - if (s && s->mig_state.get_status(s) == MIG_STATE_ACTIVE) { - s->mig_state.cancel(s); + if (s && s->get_status(s) == MIG_STATE_ACTIVE) { + s->cancel(s); } return 0; } @@ -231,7 +230,7 @@ void do_info_migrate(Monitor *mon, QObject **ret_data) QDict *qdict; if (current_migration) { - MigrationState *s = ¤t_migration->mig_state; + FdMigrationState *s = current_migration; switch (s->get_status(current_migration)) { case MIG_STATE_ACTIVE: @@ -355,8 +354,7 @@ void migrate_fd_connect(FdMigrationState *s) migrate_fd_close); DPRINTF("beginning savevm\n"); - ret = qemu_savevm_state_begin(s->mon, s->file, s->mig_state.blk, - s->mig_state.shared); + ret = qemu_savevm_state_begin(s->mon, s->file, s->blk, s->shared); if (ret < 0) { DPRINTF("failed, %d\n", ret); migrate_fd_error(s); |