[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket wit
From: |
Lei Li |
Subject: |
[Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket with qemu_fopen_socket_local |
Date: |
Thu, 21 Nov 2013 17:11:36 +0800 |
Relace qemu_fopen_socket with qemu_fopen_socket_local in Unix
protocol migration.
Signed-off-by: Lei Li <address@hidden>
---
migration-unix.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/migration-unix.c b/migration-unix.c
index 651fc5b..9beeafe 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -37,12 +37,22 @@ static void unix_wait_for_connect(int fd, void *opaque)
if (fd < 0) {
DPRINTF("migrate connect error\n");
s->file = NULL;
- migrate_fd_error(s);
+ goto fail;
} else {
DPRINTF("migrate connect success\n");
- s->file = qemu_fopen_socket(fd, "wb");
+
+ s->file = qemu_fopen_socket_local(fd, "wb");
+ if (s->file == NULL) {
+ fprintf(stderr, "failed to open Unix socket\n");
+ goto fail;
+ }
+
migrate_fd_connect(s);
+ return;
}
+
+fail:
+ migrate_fd_error(s);
}
void unix_start_outgoing_migration(MigrationState *s, const char *path, Error
**errp)
@@ -71,9 +81,9 @@ static void unix_accept_incoming_migration(void *opaque)
goto out;
}
- f = qemu_fopen_socket(c, "rb");
+ f = qemu_fopen_socket_local(c, "rb");
if (f == NULL) {
- fprintf(stderr, "could not qemu_fopen socket\n");
+ fprintf(stderr, "failed to open Unix socket\n");
goto out;
}
--
1.7.7.6
- Re: [Qemu-devel] [PATCH 10/17] migration-local: override save_page for page transmit, (continued)
- [Qemu-devel] [PATCH 11/17] savevm: adjust ram_control_save_page for page flipping, Lei Li, 2013/11/21
- [Qemu-devel] [PATCH 12/17] migration-local: override hook_ram_load, Lei Li, 2013/11/21
- [Qemu-devel] [PATCH 09/17] save_page: replace block_offset with a MemoryRegion, Lei Li, 2013/11/21
- [Qemu-devel] [PATCH 14/17] add new RanState RAN_STATE_MEMORY_STALE, Lei Li, 2013/11/21
- [Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket with qemu_fopen_socket_local,
Lei Li <=
- [Qemu-devel] [PATCH 15/17] migration-unix: page flipping support on unix outgoing, Lei Li, 2013/11/21
- [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Lei Li, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Paolo Bonzini, 2013/11/26
- Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Lei Li, 2013/11/26
- Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Paolo Bonzini, 2013/11/26
- Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Lei Li, 2013/11/26
- Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Paolo Bonzini, 2013/11/26
- Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Lei Li, 2013/11/28
[Qemu-devel] [PATCH 17/17] hmp: better format for info migrate_capabilities, Lei Li, 2013/11/21
Re: [Qemu-devel] [PATCH 0/17 v3] Localhost migration with side channel for ram, Daniel P. Berrange, 2013/11/21