aboutsummaryrefslogtreecommitdiff
path: root/migration-exec.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-exec.c
parentf37afb5ab1921f42043b5527a517eef95c36acf8 (diff)
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-exec.c')
-rw-r--r--migration-exec.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/migration-exec.c b/migration-exec.c
index 5f3f4b2c86..519af57ac7 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -92,19 +92,17 @@ static void exec_accept_incoming_migration(void *opaque)
qemu_fclose(f);
}
-int exec_start_incoming_migration(const char *command)
+void exec_start_incoming_migration(const char *command, Error **errp)
{
QEMUFile *f;
DPRINTF("Attempting to start an incoming migration\n");
f = qemu_popen_cmd(command, "r");
if(f == NULL) {
- DPRINTF("Unable to apply qemu wrapper to popen file\n");
- return -errno;
+ error_setg_errno(errp, errno, "failed to popen the migration source");
+ return;
}
qemu_set_fd_handler2(qemu_stdio_fd(f), NULL,
exec_accept_incoming_migration, NULL, f);
-
- return 0;
}