From patchwork Fri Sep 21 17:05:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 185868 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 CF3322C0088 for ; Sat, 22 Sep 2012 04:10:43 +1000 (EST) Received: from localhost ([::1]:58830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6g2-0000a8-DV for incoming@patchwork.ozlabs.org; Fri, 21 Sep 2012 13:06:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6fd-00085K-I4 for qemu-devel@nongnu.org; Fri, 21 Sep 2012 13:05:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF6fX-00006n-EP for qemu-devel@nongnu.org; Fri, 21 Sep 2012 13:05:41 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:43020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6fX-0008KE-7g for qemu-devel@nongnu.org; Fri, 21 Sep 2012 13:05:35 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so8110795pbb.4 for ; Fri, 21 Sep 2012 10:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=RVTaSLf16ZtcWCnIz0iy8ZT6bHuAc7mWHrZK0D6Xnb4=; b=tr+AKFCZUZSeOe+oiWWwIoaXTDyP3/qayNPDKVsSB6FX/dERICmsZtGhFLQ1HSNEDz GX2J82d5hUbchEUujmyfisbIukADAuTJ9K8jJIjA93kwj/1Af1THQ4AR+HC3n5PPnit/ BsxMCfOKF1uRGHq1MMajQyPlSOhRdc2yMsvtMHodW0FuZKRKUNwp4kpnyj4th9iLZwIK 2GoVBdVCrhnEWQZuuvWQ8E0mmzzDtwqI92j1PzxjwsNCKtxRc598w3bsg5X5Lu3I9mnC NTGD7UYppUT3V43lAICJNU2cjZmSfT0MxdItRIto8r180G3mPFKxsh4d8KLLGpL4Cu6g Z3nw== Received: by 10.66.88.1 with SMTP id bc1mr14811161pab.18.1348247134851; Fri, 21 Sep 2012 10:05:34 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id wl6sm2195710pbc.9.2012.09.21.10.05.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Sep 2012 10:05:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 21 Sep 2012 19:05:01 +0200 Message-Id: <1348247106-27936-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1348247106-27936-1-git-send-email-pbonzini@redhat.com> References: <1348247106-27936-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: quintela@redhat.com Subject: [Qemu-devel] [PATCH 4/9] migration: replace qemu_stdio_fd with qemu_get_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 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 50138ed..7ad98d9 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 334848a..040068d 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,