aboutsummaryrefslogtreecommitdiff
path: root/migration-fd.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2010-06-09 14:10:55 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-22 15:15:51 -0500
commit511c0231033eb8fbdf2a615b429e1bc6b5aad52c (patch)
tree4377589c1b26e1c151a0356adaa40f06cb4438b1 /migration-fd.c
parent8ca5e8011857fc59074f342bec1e8ee69410e522 (diff)
Factorize common migration incoming code
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration-fd.c')
-rw-r--r--migration-fd.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/migration-fd.c b/migration-fd.c
index 0abd372af5..6d14505632 100644
--- a/migration-fd.c
+++ b/migration-fd.c
@@ -104,20 +104,8 @@ err_after_alloc:
static void fd_accept_incoming_migration(void *opaque)
{
QEMUFile *f = opaque;
- int ret;
- ret = qemu_loadvm_state(f);
- if (ret < 0) {
- fprintf(stderr, "load of migration failed\n");
- goto err;
- }
- qemu_announce_self();
- DPRINTF("successfully loaded vm state\n");
-
- if (autostart)
- vm_start();
-
-err:
+ process_incoming_migration(f);
qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
qemu_fclose(f);
}