aboutsummaryrefslogtreecommitdiff
path: root/migration-fd.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-02 18:21:18 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-23 13:54:56 +0200
commit43eaae28e0394f8fb80848fb40aa5d28c6360321 (patch)
tree493754ef3c272334e9ddf10792a5413d2264ee3b /migration-fd.c
parentf37afb5ab1921f42043b5527a517eef95c36acf8 (diff)
downloadqemu-43eaae28e0394f8fb80848fb40aa5d28c6360321.zip
qemu-43eaae28e0394f8fb80848fb40aa5d28c6360321.tar.gz
qemu-43eaae28e0394f8fb80848fb40aa5d28c6360321.tar.bz2
migration (incoming): add error propagation to fd and exec protocols
And remove the superfluous integer return value. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'migration-fd.c')
-rw-r--r--migration-fd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/migration-fd.c b/migration-fd.c
index a7c800a..ce6932d 100644
--- a/migration-fd.c
+++ b/migration-fd.c
@@ -97,7 +97,7 @@ static void fd_accept_incoming_migration(void *opaque)
qemu_fclose(f);
}
-int fd_start_incoming_migration(const char *infd)
+void fd_start_incoming_migration(const char *infd, Error **errp)
{
int fd;
QEMUFile *f;
@@ -107,11 +107,9 @@ int fd_start_incoming_migration(const char *infd)
fd = strtol(infd, NULL, 0);
f = qemu_fdopen(fd, "rb");
if(f == NULL) {
- DPRINTF("Unable to apply qemu wrapper to file descriptor\n");
- return -errno;
+ error_setg_errno(errp, errno, "failed to open the source descriptor");
+ return;
}
qemu_set_fd_handler2(fd, NULL, fd_accept_incoming_migration, NULL, f);
-
- return 0;
}