How to define file_operations for kernel ioctl call
I have a kernel function device_ioctl(). How do I define it in file_operations?
1. struct file_operations memory_fops = { ioctl:device_ioctl }; 2. struct file_operations memory_fops = { .ioctl=device_ioctl }; 3. struct file_operations memory_fops = { device_ioctl }; which one is the right one? Thanks |
the second one should work fine, but this is the wrong forum i guess for kernel programming related queries. And, please do a little Google search before you post a question.
http://tldp.org/LDP/lkmpg/2.6/html/x892.html |
All times are GMT -5. The time now is 08:39 AM. |