Hi All,

    I have written an character device driver and add IOCTL code into the
driver. The only functionality that IOCTL provides is dumping the device
structure properties in the user specified buffer. Now I would like to write
an user application to test the driver. I am not sure how to include the
defined IOCTL into the application code (as I have used _IOXX macros to
create the IOCTLS and my driver perform checks for MAGIC number and etc.).

I tried defining IOCTLs as simple integer values and remove MAGIC number
checks in my driver things looks good from application but I am looking for
right way of implementing IOCTL in linux device driver.

Any pointers on this will be really helpful.

Regards,
Vipul.

Reply via email to