mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
migration: convert fd socket protocol to use QIOChannel
Convert the fd socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built because the QIOChannel APIs it uses will take care to report suitable error messages if needed. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1461751518-12128-16-git-send-email-berrange@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
This commit is contained in:
parent
e65c67e4da
commit
64802ee57f
4 changed files with 35 additions and 52 deletions
|
@ -317,10 +317,8 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
|
|||
#endif
|
||||
} else if (strstart(uri, "unix:", &p)) {
|
||||
unix_start_incoming_migration(p, errp);
|
||||
#if !defined(WIN32)
|
||||
} else if (strstart(uri, "fd:", &p)) {
|
||||
fd_start_incoming_migration(p, errp);
|
||||
#endif
|
||||
} else {
|
||||
error_setg(errp, "unknown migration protocol: %s", uri);
|
||||
}
|
||||
|
@ -1077,10 +1075,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
|
|||
#endif
|
||||
} else if (strstart(uri, "unix:", &p)) {
|
||||
unix_start_outgoing_migration(s, p, &local_err);
|
||||
#if !defined(WIN32)
|
||||
} else if (strstart(uri, "fd:", &p)) {
|
||||
fd_start_outgoing_migration(s, p, &local_err);
|
||||
#endif
|
||||
} else {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "uri",
|
||||
"a valid migration protocol");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue