From d263a20bcfc94a59c87176df6c2d29d65a7e4e6a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 8 Aug 2012 10:21:26 +0200 Subject: [PATCH] migration: replace qemu_stdio_fd with qemu_get_fd Reviewed-by: Orit Wasserman Signed-off-by: Paolo Bonzini --- migration-exec.c | 4 ++-- migration-fd.c | 2 +- qemu-file.h | 1 - savevm.c | 11 ----------- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/migration-exec.c b/migration-exec.c index 519af57ac..452bf071f 100644 --- a/migration-exec.c +++ b/migration-exec.c @@ -88,7 +88,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_get_fd(f), NULL, NULL, NULL, NULL); qemu_fclose(f); } @@ -103,6 +103,6 @@ void exec_start_incoming_migration(const char *command, Error **errp) 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); } diff --git a/migration-fd.c b/migration-fd.c index ce6932d7c..b47b222e8 100644 --- a/migration-fd.c +++ b/migration-fd.c @@ -93,7 +93,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_get_fd(f), NULL, NULL, NULL, NULL); qemu_fclose(f); } diff --git a/qemu-file.h b/qemu-file.h index d552f5d90..d64bdbb19 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -80,7 +80,6 @@ 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_get_fd(QEMUFile *f); -int qemu_stdio_fd(QEMUFile *f); int qemu_fclose(QEMUFile *f); void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size); void qemu_put_byte(QEMUFile *f, int v); diff --git a/savevm.c b/savevm.c index a58fe9ac4..0ab1ad4af 100644 --- a/savevm.c +++ b/savevm.c @@ -311,17 +311,6 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *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 = { .get_fd = stdio_get_fd, .get_buffer = stdio_get_buffer, -- 2.39.5