mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -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
15
migration.c
15
migration.c
|
@ -64,26 +64,23 @@ MigrationState *migrate_get_current(void)
|
|||
return ¤t_migration;
|
||||
}
|
||||
|
||||
int qemu_start_incoming_migration(const char *uri, Error **errp)
|
||||
void qemu_start_incoming_migration(const char *uri, Error **errp)
|
||||
{
|
||||
const char *p;
|
||||
int ret;
|
||||
|
||||
if (strstart(uri, "tcp:", &p))
|
||||
ret = tcp_start_incoming_migration(p, errp);
|
||||
tcp_start_incoming_migration(p, errp);
|
||||
#if !defined(WIN32)
|
||||
else if (strstart(uri, "exec:", &p))
|
||||
ret = exec_start_incoming_migration(p);
|
||||
exec_start_incoming_migration(p, errp);
|
||||
else if (strstart(uri, "unix:", &p))
|
||||
ret = unix_start_incoming_migration(p, errp);
|
||||
unix_start_incoming_migration(p, errp);
|
||||
else if (strstart(uri, "fd:", &p))
|
||||
ret = fd_start_incoming_migration(p);
|
||||
fd_start_incoming_migration(p, errp);
|
||||
#endif
|
||||
else {
|
||||
fprintf(stderr, "unknown migration protocol: %s\n", uri);
|
||||
ret = -EPROTONOSUPPORT;
|
||||
error_setg(errp, "unknown migration protocol: %s\n", uri);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void process_incoming_migration(QEMUFile *f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue