From owner-svn-src-user@FreeBSD.ORG Wed Jul 2 15:56:57 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D41FA75; Wed, 2 Jul 2014 15:56:57 +0000 (UTC) Received: from mail1.uj.edu.pl (mail1.uj.edu.pl [149.156.89.193]) by mx1.freebsd.org (Postfix) with ESMTP id 5891524D2; Wed, 2 Jul 2014 15:56:56 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from mbox.uj.edu.pl ([149.156.89.248]) by mta.uoks.uj.edu.pl (Oracle Communications Messaging Server 7u4-27.01 (7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTP id <0N8300JD5DMO9GN0@mta.uoks.uj.edu.pl>; Wed, 02 Jul 2014 17:56:49 +0200 (CEST) X-Antivirus: Dr.Web (R) for Unix mail servers drweb plugin ver.6.0.2.2 X-Antivirus-Code: 0x100000 Received: from mbox.uj.edu.pl by saiph.uoks.uj.edu.pl (Dr.Web (R) milter module ver.6.0.2.2) ; Wed, 02 Jul 2014 17:56:48 +0200 Received: from mbox.uj.edu.pl ([149.156.89.248]) by mta.uoks.uj.edu.pl with ESMTP; Wed, 02 Jul 2014 17:56:49 +0200 (CEST) Date: Wed, 02 Jul 2014 17:56:48 +0200 From: Jakub Klama In-reply-to: <53B428CD.6040402@selasky.org> Message-id: <2949d0e28da9b3475784b04db40a8127@uj.edu.pl> References: <201407021540.s62FePTQ029148@svn.freebsd.org> <53B428CD.6040402@selasky.org> Subject: Re: svn commit: r268163 - in =?UTF-8?Q?user/jceel/soc=32=30=31=34?= =?UTF-8?Q?=5Fevdev/head/sys=3A=20conf=20dev/evdev?= To: Hans Petter Selasky User-Agent: Roundcube Webmail/0.5 X-Sender: jakub.klama@uj.edu.pl Cc: src-committers@freebsd.org, Jakub Wojciech Klama , svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2014 15:56:57 -0000 On Wed, 02 Jul 2014 17:44:13 +0200, Hans Petter Selasky wrote: > On 07/02/14 17:40, Jakub Wojciech Klama wrote: >> +static int >> +uinput_poll(struct cdev *dev, int events, struct thread *td) >> +{ >> + struct uinput_cdev_state *state; >> + int ret; >> + int revents = 0; >> + >> + debugf("cdev: poll by thread %d", td->td_tid); >> + >> + ret = devfs_get_cdevpriv((void **)&state); >> + if (ret != 0) >> + return (ret); > > Hi, > > In case of error "poll" returns POLLNVAL, I think. Hi Hans, Actually, whole uinput_poll() code is bogus and will be corrected - all that poll() on uinput node should do is to always allow write. However, thanks for pointing that out - same piece of code exists in evdev/cdev.c, where it actually needs to be fixed. Jakub