提交 d263a20b 编写于 作者: P Paolo Bonzini

migration: replace qemu_stdio_fd with qemu_get_fd

Reviewed-by: NOrit Wasserman <owasserm@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 70eb6330
...@@ -88,7 +88,7 @@ static void exec_accept_incoming_migration(void *opaque) ...@@ -88,7 +88,7 @@ static void exec_accept_incoming_migration(void *opaque)
QEMUFile *f = opaque; QEMUFile *f = opaque;
process_incoming_migration(f); process_incoming_migration(f);
qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL); qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
qemu_fclose(f); qemu_fclose(f);
} }
...@@ -103,6 +103,6 @@ void exec_start_incoming_migration(const char *command, Error **errp) ...@@ -103,6 +103,6 @@ void exec_start_incoming_migration(const char *command, Error **errp)
return; return;
} }
qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, qemu_set_fd_handler2(qemu_get_fd(f), NULL,
exec_accept_incoming_migration, NULL, f); exec_accept_incoming_migration, NULL, f);
} }
...@@ -93,7 +93,7 @@ static void fd_accept_incoming_migration(void *opaque) ...@@ -93,7 +93,7 @@ static void fd_accept_incoming_migration(void *opaque)
QEMUFile *f = opaque; QEMUFile *f = opaque;
process_incoming_migration(f); process_incoming_migration(f);
qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL); qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
qemu_fclose(f); qemu_fclose(f);
} }
......
...@@ -80,7 +80,6 @@ QEMUFile *qemu_fopen_socket(int fd); ...@@ -80,7 +80,6 @@ QEMUFile *qemu_fopen_socket(int fd);
QEMUFile *qemu_popen(FILE *popen_file, const char *mode); QEMUFile *qemu_popen(FILE *popen_file, const char *mode);
QEMUFile *qemu_popen_cmd(const char *command, const char *mode); QEMUFile *qemu_popen_cmd(const char *command, const char *mode);
int qemu_get_fd(QEMUFile *f); int qemu_get_fd(QEMUFile *f);
int qemu_stdio_fd(QEMUFile *f);
int qemu_fclose(QEMUFile *f); int qemu_fclose(QEMUFile *f);
void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size); void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size);
void qemu_put_byte(QEMUFile *f, int v); void qemu_put_byte(QEMUFile *f, int v);
......
...@@ -311,17 +311,6 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode) ...@@ -311,17 +311,6 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
return qemu_popen(popen_file, mode); return qemu_popen(popen_file, mode);
} }
int qemu_stdio_fd(QEMUFile *f)
{
QEMUFileStdio *p;
int fd;
p = (QEMUFileStdio *)f->opaque;
fd = fileno(p->stdio_file);
return fd;
}
static const QEMUFileOps stdio_file_read_ops = { static const QEMUFileOps stdio_file_read_ops = {
.get_fd = stdio_get_fd, .get_fd = stdio_get_fd,
.get_buffer = stdio_get_buffer, .get_buffer = stdio_get_buffer,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册