diff options
author | Peter Xu <peterx@redhat.com> | 2018-02-08 18:31:15 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-02-14 10:37:09 +0000 |
commit | 3e0c8050ebba3f55dc2d92b3790a3cfb80786d07 (patch) | |
tree | a4f08216d9d5236cfec6d7d3a2071f328004409d /migration/savevm.c | |
parent | d6208e35e4a228fb07bac60095c5fac706c3fde7 (diff) |
migration: pass MigrationState to migrate_init()
Let the callers take the object, then pass it to migrate_init().
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180208103132.28452-12-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r-- | migration/savevm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index 967c3bca0d..8e6d872452 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1257,8 +1257,11 @@ void qemu_savevm_state_cleanup(void) static int qemu_savevm_state(QEMUFile *f, Error **errp) { int ret; - MigrationState *ms = migrate_init(); + MigrationState *ms = migrate_get_current(); MigrationStatus status; + + migrate_init(ms); + ms->to_dst_file = f; if (migration_is_blocked(errp)) { |