Using driver defined IOCTL from user space (for my test driver)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <kernelnewbies@...>
Date: Saturday, July 4, 2009 - 6:12 pm

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.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using driver defined IOCTL from user space (for my test driv..., Vipul Jain, (Sat Jul 4, 6:12 pm)
When the driver probe functions will be called!!!, Murali N, (Fri Apr 17, 2:49 am)
Re: When the driver probe functions will be called!!!, pradeep singh, (Fri Apr 17, 7:35 am)
Re: When the driver probe functions will be called!!!, Denis Borisevich, (Fri Apr 17, 8:33 am)