@@ -98,7 +98,7 @@ static void exec_accept_incoming_migration(void *opaque)
QEMUFile *f = opaque;
process_incoming_migration(f);
- qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
+ qemu_set_fd_handler2(qemu_file_fd(f), NULL, NULL, NULL, NULL);
qemu_fclose(f);
}
@@ -113,7 +113,7 @@ int exec_start_incoming_migration(const char *command)
return -errno;
}
- qemu_set_fd_handler2(qemu_stdio_fd(f), NULL,
+ qemu_set_fd_handler2(qemu_file_fd(f), NULL,
exec_accept_incoming_migration, NULL, f);
return 0;
@@ -104,7 +104,7 @@ static void fd_accept_incoming_migration(void *opaque)
QEMUFile *f = opaque;
process_incoming_migration(f);
- qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
+ qemu_set_fd_handler2(qemu_file_fd(f), NULL, NULL, NULL, NULL);
qemu_fclose(f);
}
@@ -70,7 +70,6 @@ QEMUFile *qemu_fdopen(int fd, const char *mode);
QEMUFile *qemu_fopen_socket(int fd);
QEMUFile *qemu_popen(FILE *popen_file, const char *mode);
QEMUFile *qemu_popen_cmd(const char *command, const char *mode);
-int qemu_stdio_fd(QEMUFile *f);
int qemu_file_fd(QEMUFile *f);
void qemu_fflush(QEMUFile *f);
void qemu_buffered_file_drain(QEMUFile *f);
@@ -293,18 +293,6 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
return qemu_popen(popen_file, mode);
}
-/* TODO: replace this with qemu_file_fd() */
-int qemu_stdio_fd(QEMUFile *f)
-{
- QEMUFileStdio *p;
- int fd;
-
- p = (QEMUFileStdio *)f->opaque;
- fd = fileno(p->stdio_file);
-
- return fd;
-}
-
QEMUFile *qemu_fdopen(int fd, const char *mode)
{
QEMUFileStdio *s;
Now qemu_file_fd() replaces qemu_stdio_fd(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- migration-exec.c | 4 ++-- migration-fd.c | 2 +- qemu-file.h | 1 - savevm.c | 12 ------------ 4 files changed, 3 insertions(+), 16 deletions(-)