From owner-svn-src-head@freebsd.org Fri Nov 3 21:50:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37191E5C1F7 for ; Fri, 3 Nov 2017 21:50:04 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id D7DF07519D; Fri, 3 Nov 2017 21:50:03 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id B37F72689A; Sat, 4 Nov 2017 00:41:21 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id YIpMsK4Ddn-v; Sat, 4 Nov 2017 00:41:14 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 592BA26891; Sat, 4 Nov 2017 00:41:14 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 882753AC8F6; Sat, 4 Nov 2017 00:41:10 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id ds7Qd4GqGwR9; Sat, 4 Nov 2017 00:41:03 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id 65E0E3AC8E2; Sat, 4 Nov 2017 00:41:03 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 04 Nov 2017 00:41:03 +0300 From: Vladimir Kondratyev To: Alexander Leidinger Cc: Vladimir Kondratyev , src-committers@freebsd.org, svn-src-head@freebsd.org, owner-src-committers@freebsd.org Subject: Re: svn commit: r325294 - head/sys/dev/evdev In-Reply-To: <20171103152249.Horde.GhFLgOI9qGzukB248GjNGNm@webmail.leidinger.net> References: <20171103152249.Horde.GhFLgOI9qGzukB248GjNGNm@webmail.leidinger.net> Message-ID: <7c86814bb41cea48a893d098a56087fd@kondratyev.su> X-Sender: vladimir@kondratyev.su User-Agent: Roundcube Webmail/1.2.5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2017 21:50:04 -0000 On 2017-11-03 17:22, Alexander Leidinger wrote: > Quoting Vladimir Kondratyev (from Wed, 1 Nov 2017 > 22:09:10 +0000 (UTC)): > >> Author: wulf >> Date: Wed Nov 1 22:09:10 2017 >> New Revision: 325294 >> URL: https://svnweb.freebsd.org/changeset/base/325294 >> >> Log: >> evdev: Hide "kern.evdev.rcpt_mask" sysctl if kernel is compiled >> w/o EVDEV_SUPPORT as it's value has no meaning in this case. >> >> Now presence of this sysctl can be used for discovery if evdev >> support >> for hybrid devices is compiled into kernel or not. > > If you want to show the presence of a feature in the kernel: we have > the FEATURE() macro for this. It's in sys/sysctl.h and you can use it > like: > FEATURE(evdev, "evdev protocol support"); That is done in the initial evdev commit. See line 54 of sys/dev/evdev/evdev.c The presence of this sysctl shows that the support for evdev protocol is compiled into drivers that capable to report events in both traditional an evdev ways. But, I agree. It is better to add another one FEATURE() line for "option EVDEV_SUPPORT" than do a conditional exposure of "magic" sysctl. I will fix that. Thank you. -- WBR Vladimir Kondratyev