Re: [PATCH RESEND libgpiod v2 10/18] dbus: add the API definitions

Simon McVittie <smcv-ZGY8ohtN/[email protected]> Mon, 8 Jul 2024 12:55:05 +0100
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <ZovTmYAz2xLYtyv7@descent>
On Tue, 02 Jul 2024 at 11:15:11 +0200, Bartosz Golaszewski wrote:
> On Tue, Jul 2, 2024 at 11:06 AM Thiago Macieira <[email protected]> wrote:
> > The argument is that the presence of the
> > property can lead application authors to check before RequestLine in order to
> > present a message to their users
> 
> Unfortunately there's one issue with the above: requesting a line
> (even as input) may result in the kernel driver triggering a physical
> change in hardware which may be undesirable.

If that's the case, I'd recommend mentioning in the property's
documentation that it's only suitable for debugging/inspection UIs that
want to know the current state passively, and applications that want
to access the line should always just call RequestLine (and be prepared
for it to fail) to avoid the TOCTOU.

    smcv