From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSPBa-00064B-J7 for qemu-devel@nongnu.org; Sun, 28 Oct 2012 05:29:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSPBZ-0006k9-K0 for qemu-devel@nongnu.org; Sun, 28 Oct 2012 05:29:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSPBZ-0006k5-9y for qemu-devel@nongnu.org; Sun, 28 Oct 2012 05:29:37 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9S9TaMO023194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 28 Oct 2012 05:29:36 -0400 Message-ID: <508CFAFD.9070902@redhat.com> Date: Sun, 28 Oct 2012 11:29:33 +0200 From: Orit Wasserman MIME-Version: 1.0 References: <1350555758-29988-1-git-send-email-pbonzini@redhat.com> <1350555758-29988-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1350555758-29988-5-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [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: Paolo Bonzini Cc: qemu-devel@nongnu.org, quintela@redhat.com On 10/18/2012 12:22 PM, Paolo Bonzini wrote: > 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 6c97db9..f81e390 100644 > --- a/migration-exec.c > +++ b/migration-exec.c > @@ -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_get_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_get_fd(f), NULL, > exec_accept_incoming_migration, NULL, f); > > return 0; > diff --git a/migration-fd.c b/migration-fd.c > index 7335167..43cc730 100644 > --- a/migration-fd.c > +++ b/migration-fd.c > @@ -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_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 5c0a756..7eca28b 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -310,17 +310,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, > Reviewed-by: Orit Wasserman