linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: "open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	Peter Hutterer <peter.hutterer@who-t.net>,
	Benjamin Tissoires <benjamin.tissoires@gmail.com>
Subject: Re: [PATCH RESEND RESEND] Input: evdev - add event-mask API
Date: Tue, 4 Nov 2014 10:36:19 -0800	[thread overview]
Message-ID: <20141104183619.GC440@dtor-ws> (raw)
In-Reply-To: <CANq1E4T-mXU0mXzgCPQi=oDg01DkSEzJN3JEwD1EGDCxWVryrQ@mail.gmail.com>

On Tue, Nov 04, 2014 at 11:51:34AM +0100, David Herrmann wrote:
> Hi Dmitry
> 
> Sorry for the delay, back from holiday now.
> 
> On Fri, Oct 10, 2014 at 12:52 AM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > diff -u b/include/uapi/linux/input.h b/include/uapi/linux/input.h
> > --- b/include/uapi/linux/input.h
> > +++ b/include/uapi/linux/input.h
> > @@ -161,53 +161,59 @@
> >  #define EVIOCREVOKE            _IOW('E', 0x91, int)                    /* Revoke device access */
> >
> >  /**
> > - * EVIOCGMASK - Retrieve current event-mask
> > + * EVIOCGMASK - Retrieve current event mask
> >   *
> > - * This retrieves the current event-mask for a specific event-type. The
> > - * argument must be of type "struct input_mask" and specifies the event-type to
> > - * query, the receive buffer and the size of the receive buffer.
> > - *
> > - * The event-mask is a per-client mask that specifies which events are forwarded
> > - * to the client. Each event-code is represented by a single bit in the
> > - * event-mask. If the bit is set, the event is passed to the client normally.
> > - * Otherwise, the event is filtered and and will never be queued on the
> > - * client's receive buffer.
> > - * Event-masks do not affect global state of an input-device. They only affect
> > - * the open-file they're applied on. Each open-file (i.e, file-description) can
> > - * have a different event-mask.
> > - *
> > - * The default event-mask for a client has all bits set, i.e. all events are
> > - * forwarded to the client. If a kernel is queried for an unknown event-type
> > - * or if the receive buffer is larger than the number of event-codes known to
> > - * the kernel, the kernel returns all zeroes for those codes.
> > + * This ioctl allows user to retrieve the current event mask for specific
> > + * event type. The argument must be of type "struct input_mask" and
> > + * specifies the event type to query, the address of the receive buffer and
> > + * the size of the receive buffer.
> > + *
> > + * The event mask is a per-client mask that specifies which events are
> > + * forwarded to the client. Each event code is represented by a single bit
> > + * in the event mask. If the bit is set, the event is passed to the client
> > + * normally. Otherwise, the event is filtered and will never be queued on
> > + * the client's receive buffer.
> > + *
> > + * Event masks do not affect global state of the input device. They only
> > + * affect the file descriptor they are applied to.
> > + *
> > + * The default event mask for a client has all bits set, i.e. all events
> > + * are forwarded to the client. If kernel is queried for an unknown
> > + * event type or if the receive buffer is larger than the number of
> > + * event codes known to the kernel, the kernel returns all zeroes for those
> > + * codes.
> >   *
> >   * At maximum, codes_size bytes are copied.
> >   *
> > - * This ioctl may fail with ENODEV in case the file is revoked, EFAULT
> > - * if the receive-buffer points to invalid memory, or EINVAL if the kernel
> > - * does not implement the ioctl.
> > + * This ioctl may fail with ENODEV in case the descriptor is revoked,
> > + * EFAULT if the receive buffer points to invalid memory, or EINVAL if the
> > + * kernel does not implement the ioctl.
> 
> I fixed everything up, except for this hunk. A "descriptor" cannot be
> revoked, it's always the "description" that is revoked
> (file-descriptor vs. file-description). I'm not sure what name to use
> here. "file-description" would serve best, I guess, but it's not that
> commonly used (nor understood). It's defined properly by POSIX,
> though.

OK, let's leave it as is then.

-- 
Dmitry

      reply	other threads:[~2014-11-04 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13  7:16 [PATCH RESEND RESEND] Input: evdev - add event-mask API David Herrmann
2014-09-28 10:19 ` David Herrmann
2014-10-09 22:52   ` Dmitry Torokhov
2014-10-10  8:28     ` David Herrmann
2014-11-04 10:51     ` David Herrmann
2014-11-04 18:36       ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141104183619.GC440@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dh.herrmann@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).