[Toybox] [PATCH] sendevent: remove ioctl call

Nick Kralevich nnk at google.com
Mon Aug 27 13:25:13 PDT 2018

It just occurred to me that there could be another intention behind
the ioctl call. Calling ioctl(EVIOCGVERSION) on the /dev/input device
is a way for the code to verify it's actually sending messages to a
/dev/input file, vs some other file. So, while not documented in the
source code, this call may actually have value and protect the caller
from inadvertently specifying an invalid file.

-- Nick

On Mon, Aug 27, 2018 at 11:31 AM Nick Kralevich <nnk at google.com> wrote:
> The version number queried by this ioctl call is never used.
> Delete it.
> -- Nick

Nick Kralevich | nnk at google.com

More information about the Toybox mailing list