Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Nov 2017 00:41:03 +0300
From:      Vladimir Kondratyev <vladimir@kondratyev.su>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        Vladimir Kondratyev <wulf@freebsd.org>, src-committers@freebsd.org, svn-src-head@freebsd.org, owner-src-committers@freebsd.org
Subject:   Re: svn commit: r325294 - head/sys/dev/evdev
Message-ID:  <7c86814bb41cea48a893d098a56087fd@kondratyev.su>
In-Reply-To: <20171103152249.Horde.GhFLgOI9qGzukB248GjNGNm@webmail.leidinger.net>
References:  <20171103152249.Horde.GhFLgOI9qGzukB248GjNGNm@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2017-11-03 17:22, Alexander Leidinger wrote:
> Quoting Vladimir Kondratyev <wulf@freebsd.org> (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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7c86814bb41cea48a893d098a56087fd>