From patchwork Fri Feb 14 23:02:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 3654901 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0CE1ABF13A for ; Fri, 14 Feb 2014 23:02:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A936201BF for ; Fri, 14 Feb 2014 23:02:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5A6A3201BB for ; Fri, 14 Feb 2014 23:02:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26C0AFA696; Fri, 14 Feb 2014 15:02:42 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id A9603FA67B for ; Fri, 14 Feb 2014 15:02:40 -0800 (PST) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1EN2eZx002381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Feb 2014 18:02:40 -0500 Received: from shalem.localdomain.com (vpn1-5-47.ams2.redhat.com [10.36.5.47]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s1EN2d7Z010760; Fri, 14 Feb 2014 18:02:39 -0500 From: Hans de Goede To: intel-gfx@lists.freedesktop.org Date: Sat, 15 Feb 2014 00:02:35 +0100 Message-Id: <1392418957-12889-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Cc: peter.hutterer@redhat.com Subject: [Intel-gfx] [PATCH 1/3] xf86-video-intel: Fix fd_set_nonblock X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP O_NONBLOCK is a status flag not a descriptor flag, so F_GETFL / F_SETFL should be used to modify it. Signed-off-by: Hans de Goede --- src/intel_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel_device.c b/src/intel_device.c index effda24..07b7d2e 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -167,10 +167,10 @@ static int fd_set_nonblock(int fd) if (fd == -1) return fd; - flags = fcntl(fd, F_GETFD); + flags = fcntl(fd, F_GETFL); if (flags != -1) { flags |= O_NONBLOCK; - fcntl(fd, F_SETFD, flags); + fcntl(fd, F_SETFL, flags); } return fd;