in reply to ioctl call of streams device driver ?

Some observations:

You don't check the value of $rc.

In your pack and unpack, you give 3 'Q' actions but pass or expect 4 args.

Does strace (or whatever) show whether your perl process is making an ioctl system call with the correct fd, request and ptr args?

Does the value of $REG_R correctly encode the details of the ioctl call - i.e. to indicate whether the arg is input or output and its size? See e.g. /usr/include/asm-generic/ioctl.h on linux systems.

Dave.

  • Comment on Re: ioctl call of streams device driver ?