mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
f37afb5ab1
commit
43eaae28e0
7 changed files with 27 additions and 42 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue