From patchwork Mon Jun 4 09:57:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 162727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 657B7B7003 for ; Mon, 4 Jun 2012 21:08:36 +1000 (EST) Received: from localhost ([::1]:38798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbU41-0001W7-Vp for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2012 05:59:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbU2z-0008Si-Od for qemu-devel@nongnu.org; Mon, 04 Jun 2012 05:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbU2r-0004e4-DJ for qemu-devel@nongnu.org; Mon, 04 Jun 2012 05:58:01 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:46517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbU2q-0004bp-VM for qemu-devel@nongnu.org; Mon, 04 Jun 2012 05:57:53 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id EA1804898D; Mon, 4 Jun 2012 18:57:45 +0900 (JST) Received: (nullmailer pid 5131 invoked by uid 1000); Mon, 04 Jun 2012 09:57:45 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org, kvm@vger.kernel.org Date: Mon, 4 Jun 2012 18:57:21 +0900 Message-Id: X-Mailer: git-send-email 1.7.1.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 210.128.90.3 Cc: benoit.hudzia@gmail.com, aarcange@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, t.hirofuchi@aist.go.jp, dlaor@redhat.com, satoshi.itoh@aist.go.jp, mdroth@linux.vnet.ibm.com, yoshikawa.takuya@oss.ntt.co.jp, owasserm@redhat.com, avi@redhat.com, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH v2 19/41] savevm/QEMUFile: drop qemu_stdio_fd X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Now qemu_file_fd() replaces qemu_stdio_fd(). Signed-off-by: Isaku Yamahata --- migration-exec.c | 4 ++-- migration-fd.c | 2 +- qemu-file.h | 1 - savevm.c | 12 ------------ 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/migration-exec.c b/migration-exec.c index 6c97db9..95e9779 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_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; diff --git a/migration-fd.c b/migration-fd.c index 50138ed..d9c13fe 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_file_fd(f), NULL, NULL, NULL, NULL); qemu_fclose(f); } diff --git a/qemu-file.h b/qemu-file.h index 98a8023..1a12e7d 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -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); diff --git a/savevm.c b/savevm.c index cba1a69..ec9f5d0 100644 --- a/savevm.c +++ b/savevm.c @@ -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;