aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-08-24 12:51:48 +0200
committerJuan Quintela <quintela@redhat.com>2012-10-17 18:34:59 +0200
commit9499743f36169cf7d974640f123bc29836f75a2d (patch)
tree1ba7c7711c3780077979d507f5de5cd86f21e94f /migration.c
parentd2dbc8e6a95a9f66f886c35db42786efc906c777 (diff)
migration: make migrate_fd_wait_for_unfreeze() return errors
Adjust all callers Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/migration.c b/migration.c
index ea21dc40e1..2c93951423 100644
--- a/migration.c
+++ b/migration.c
@@ -370,13 +370,13 @@ static void migrate_fd_cancel(MigrationState *s)
migrate_fd_cleanup(s);
}
-void migrate_fd_wait_for_unfreeze(MigrationState *s)
+int migrate_fd_wait_for_unfreeze(MigrationState *s)
{
int ret;
DPRINTF("wait for unfreeze\n");
if (s->state != MIG_STATE_ACTIVE)
- return;
+ return -EINVAL;
do {
fd_set wfds;
@@ -388,8 +388,9 @@ void migrate_fd_wait_for_unfreeze(MigrationState *s)
} while (ret == -1 && (s->get_error(s)) == EINTR);
if (ret == -1) {
- qemu_file_set_error(s->file, -s->get_error(s));
+ return -s->get_error(s);
}
+ return 0;
}
int migrate_fd_close(MigrationState *s)