|There's more than one way to do things|
Custom ioctl on Linux?by wjblack (Initiate)
|on Feb 25, 2010 at 10:33 UTC||Need Help??|
wjblack has asked for the
wisdom of the Perl Monks concerning the following question:
I have a weird device that I'm using ioctl to talk to (on Linux 2.6). The code in C to do what I want is:
Simple and straightforward--I'm just sending ioctl # 0xC to the driver and printing out the response. Works every time. The equivalent code in Perl is (I believe):
The driver, however, never receives the ioctl (I put some debug code in the driver that printk's whenever it gets an ioctl). The driver does receive the TCGETS ioctl from sysopen (with which it responds "Operation not supported" as expected). $! after the ioctl is "Invalid argument".
The strace tells a similar story:
So to sum up:
Any thoughts as to why 0xC is being blocked? I'd rather not have to have a trivial C helper app for this...