From patchwork Wed Jan 13 15:20:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 42828 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 092B5B7C90 for ; Thu, 14 Jan 2010 02:25:20 +1100 (EST) Received: from localhost ([127.0.0.1]:34818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV55A-0001fi-NW for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2010 10:24:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV52m-0001Lh-KA for qemu-devel@nongnu.org; Wed, 13 Jan 2010 10:22:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV52i-0001JN-1P for qemu-devel@nongnu.org; Wed, 13 Jan 2010 10:21:59 -0500 Received: from [199.232.76.173] (port=36018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV52h-0001JH-QK for qemu-devel@nongnu.org; Wed, 13 Jan 2010 10:21:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39807) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV52h-0005rM-CQ for qemu-devel@nongnu.org; Wed, 13 Jan 2010 10:21:55 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0DFLsQD005065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Jan 2010 10:21:54 -0500 Received: from localhost.localdomain (dhcp-5-175.str.redhat.com [10.32.5.175]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0DFLqf1019389; Wed, 13 Jan 2010 10:21:53 -0500 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Wed, 13 Jan 2010 16:20:56 +0100 Message-Id: <1263396056-7816-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Kevin Wolf Subject: [Qemu-devel] [PATCH] osdep.c: Fix accept4 fallback X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is older than the kernel of the build system. Unfortunately, v1 was committed instead of v2, so the code has a bug that was revealed in the review (checking for the wrong error code). Signed-off-by: Kevin Wolf --- osdep.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/osdep.c b/osdep.c index e4836e7..1310684 100644 --- a/osdep.c +++ b/osdep.c @@ -297,7 +297,7 @@ int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen) #ifdef CONFIG_ACCEPT4 ret = accept4(s, addr, addrlen, SOCK_CLOEXEC); - if (ret != -1 || errno != EINVAL) { + if (ret != -1 || errno != ENOSYS) { return ret; } #endif