mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
migration: use QEMUFile for writing outgoing migration data
Second, drop the file descriptor indirection, and write directly to the QEMUFile. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
f8bbc12863
commit
e6a1cf2132
6 changed files with 8 additions and 90 deletions
|
@ -29,16 +29,6 @@
|
|||
do { } while (0)
|
||||
#endif
|
||||
|
||||
static int unix_errno(MigrationState *s)
|
||||
{
|
||||
return errno;
|
||||
}
|
||||
|
||||
static int unix_write(MigrationState *s, const void * buf, size_t size)
|
||||
{
|
||||
return write(s->fd, buf, size);
|
||||
}
|
||||
|
||||
static void unix_wait_for_connect(int fd, void *opaque)
|
||||
{
|
||||
MigrationState *s = opaque;
|
||||
|
@ -56,8 +46,6 @@ static void unix_wait_for_connect(int fd, void *opaque)
|
|||
|
||||
void unix_start_outgoing_migration(MigrationState *s, const char *path, Error **errp)
|
||||
{
|
||||
s->get_error = unix_errno;
|
||||
s->write = unix_write;
|
||||
unix_nonblocking_connect(path, unix_wait_for_connect, s, errp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue