aboutsummaryrefslogtreecommitdiff
path: root/migration/savevm.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:10:40 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 14:51:49 +0100
commitaefeb18bde45fa629e3055a7bb6637a7dcad8c36 (patch)
tree8086912133e1f0e5f161c2a4ffaa63edba7d206c /migration/savevm.c
parenta776aa15a7e3e08964c6c537314b9590dde27b4d (diff)
downloadqemu-aefeb18bde45fa629e3055a7bb6637a7dcad8c36.zip
qemu-aefeb18bde45fa629e3055a7bb6637a7dcad8c36.tar.gz
qemu-aefeb18bde45fa629e3055a7bb6637a7dcad8c36.tar.bz2
migrate_init: Call from savevm
Suspend to file is very much like a migrate, and it makes life easier if we have the Migration state available, so initialise it in the savevm.c code for suspending. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewd-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r--migration/savevm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index 638aa1f..9dc57d3 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -922,6 +922,8 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp)
.blk = 0,
.shared = 0
};
+ MigrationState *ms = migrate_init(&params);
+ ms->file = f;
if (qemu_savevm_state_blocked(errp)) {
return -EINVAL;