aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-09-22 11:02:14 +0200
committerJuan Quintela <quintela@redhat.com>2011-10-20 13:23:52 +0200
commit3934638539c763ad23026b70483e60be34078c57 (patch)
tree33dac9d54aa032ebb45313d55997d9f87823f88b /migration.c
parentdcd1d224dfcad1154a516e683ab55ea848497f50 (diff)
migration: return real error code
make functions propagate errno, instead of just using -EIO. Add a comment about what are the return value of qemu_savevm_state_iterate(). Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/migration.c b/migration.c
index d5876a9d93..c1d647c102 100644
--- a/migration.c
+++ b/migration.c
@@ -367,6 +367,7 @@ void migrate_fd_connect(FdMigrationState *s)
void migrate_fd_put_ready(void *opaque)
{
FdMigrationState *s = opaque;
+ int ret;
if (s->state != MIG_STATE_ACTIVE) {
DPRINTF("put_ready returning because of non-active state\n");
@@ -374,7 +375,10 @@ void migrate_fd_put_ready(void *opaque)
}
DPRINTF("iterate\n");
- if (qemu_savevm_state_iterate(s->mon, s->file) == 1) {
+ ret = qemu_savevm_state_iterate(s->mon, s->file);
+ if (ret < 0) {
+ migrate_fd_error(s);
+ } else if (ret == 1) {
int old_vm_running = runstate_is_running();
DPRINTF("done iterating\n");