From patchwork Mon Oct 22 13:53:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Bryant X-Patchwork-Id: 193158 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 BE5492C008B for ; Tue, 23 Oct 2012 00:55:21 +1100 (EST) Received: from localhost ([::1]:50263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQITQ-0003Fu-0N for incoming@patchwork.ozlabs.org; Mon, 22 Oct 2012 09:55:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQITD-0003DZ-Q4 for qemu-devel@nongnu.org; Mon, 22 Oct 2012 09:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQIT1-00042g-B5 for qemu-devel@nongnu.org; Mon, 22 Oct 2012 09:55:07 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:54994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQIT1-0003fl-72 for qemu-devel@nongnu.org; Mon, 22 Oct 2012 09:54:55 -0400 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 22 Oct 2012 09:53:53 -0400 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e9.ny.us.ibm.com (192.168.1.109) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 22 Oct 2012 09:53:51 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 83252C9004A for ; Mon, 22 Oct 2012 09:53:49 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9MDrnjk290608 for ; Mon, 22 Oct 2012 09:53:49 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9MDrmOp010868 for ; Mon, 22 Oct 2012 11:53:48 -0200 Received: from localhost ([9.80.110.95]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q9MDrlow010836; Mon, 22 Oct 2012 11:53:47 -0200 From: Corey Bryant To: qemu-devel@nongnu.org Date: Mon, 22 Oct 2012 09:53:44 -0400 Message-Id: <1350914024-4794-1-git-send-email-coreyb@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.11.4 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12102213-7182-0000-0000-000002E61B65 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.97.182.139 Cc: kwolf@redhat.com, gollub@b1-systems.de, Corey Bryant , agraf@suse.de, lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH] main: Hide F_GETFD and FD_CLOEXEC use for _WIN32 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: Corey Bryant --- vl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vl.c b/vl.c index 200d849..94c667d 100644 --- a/vl.c +++ b/vl.c @@ -812,11 +812,13 @@ static int parse_add_fd(QemuOpts *opts, void *opaque) return -1; } +#ifndef _WIN32 if (fcntl(fd, F_GETFD) & FD_CLOEXEC) { qerror_report(ERROR_CLASS_GENERIC_ERROR, "fd is not valid or already in use"); return -1; } +#endif if (fdset_id < 0) { qerror_report(ERROR_CLASS_GENERIC_ERROR,