From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TULP3-000220-Qp for qemu-devel@nongnu.org; Fri, 02 Nov 2012 13:51:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TULP1-0005RX-3l for qemu-devel@nongnu.org; Fri, 02 Nov 2012 13:51:33 -0400 Received: from mail-da0-f45.google.com ([209.85.210.45]:37398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TULP0-0005RD-Tn for qemu-devel@nongnu.org; Fri, 02 Nov 2012 13:51:31 -0400 Received: by mail-da0-f45.google.com with SMTP id n15so1690046dad.4 for ; Fri, 02 Nov 2012 10:51:30 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 2 Nov 2012 18:50:57 +0100 Message-Id: <1351878665-32413-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1351878665-32413-1-git-send-email-pbonzini@redhat.com> References: <1351878665-32413-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 04/12] migration: replace qemu_stdio_fd with qemu_get_fd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com 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 file modificati, 3 inserzioni(+), 15 rimozioni(-) diff --git a/migration-exec.c b/migration-exec.c index 519af57..452bf07 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 ce6932d..b47b222 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 d552f5d..d64bdbb 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 a58fe9a..0ab1ad4 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, -- 1.7.12.1