From owner-svn-src-user@FreeBSD.ORG Wed Jul 2 16:08:04 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FBF9178; Wed, 2 Jul 2014 16:08:04 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B88925C5; Wed, 2 Jul 2014 16:08:03 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 4BD231FE02D; Wed, 2 Jul 2014 18:07:58 +0200 (CEST) Message-ID: <53B42E6D.3020305@selasky.org> Date: Wed, 02 Jul 2014 18:08:13 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Jakub Klama Subject: Re: svn commit: r268163 - in user/jceel/soc2014_evdev/head/sys: conf dev/evdev References: <201407021540.s62FePTQ029148@svn.freebsd.org> <53B428CD.6040402@selasky.org> <28a06d7587dc84e2e03928b8aa7a403f@uj.edu.pl> In-Reply-To: <28a06d7587dc84e2e03928b8aa7a403f@uj.edu.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 16:08:04 -0000 On 07/02/14 18:00, Jakub Klama wrote: > 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. > > Hm... POLLNVAL or rather POLLERR? > Hi, Search for POLLNVAL in "kern/sys_generic.c" and you'll see why. POLLNVAL is used if the file descriptor is no longer valid. POLLERR is something else. --HPS