Doing a non-standard ioctl in Perl
Jonathan Stowe
jns at integration-house.com
Fri Nov 7 10:43:27 GMT 2008
2008/11/6 Roger Burton West <roger at firedrake.org>:
> For various reasons, I want to do an EVIOCGRAB ioctl.
>
> perldoc -f ioctl tells me "require sys/ioctl.ph", and gives all sorts of
> scary warnings. But EVIOCGRAB isn't in sys/ioctl.ph. What's the approved
> way of doing this? That's the only ioctl I'm likely to want to use in
> this program, so I don't particularly fancy converting a whole bunch of
> others that I'm not going to need.
>
> If it helps:
>
> linux/input.h:#define EVIOCGRAB _IOW('E', 0x90, int)
>
Is there a linux/input.ph or is it possible to generate one from the
linux/input.h using h2ph ?
EVIOCGRAB would be something like:
sub EVIOCGRAB () { _IOW(ord('E'), 0x90, 'int');}
where _IOW is defined in asm-generic/ioctl.ph on my system.
/J\
More information about the london.pm
mailing list