| Welcome to AT91SAM Community Forum http://www.at91.com/samphpbb/ |
|
| IOCTL with "inode" support for linux 2.6.39 http://www.at91.com/samphpbb/viewtopic.php?f=12&t=20700 |
Page 1 of 1 |
| Author: | ganesha.ld [ Tue Feb 28, 2012 3:33 pm ] |
| Post subject: | IOCTL with "inode" support for linux 2.6.39 |
Hi, I'm Working with AT91SAM9G25 Evaluation board (AT91SAM9x5) and linux 2.6.39 (with buildroot-2011.05). I wanted to write ioctl routine for a kernel module/driver, which has 1 MAJOR number and 4 MINOR numbers (4 devices of SAME type). I found that file_operations structure in "linux/fs.h", in linux-2.6.39 source tree does not have the field "ioctl". To get the device identification through minor number, "inode" structure pointer should be there in any ioctl calls. I found that the function pointers "unlocked_ioctl" and "compat_ioctl" in linux/fs.h DO NOT contain "inode" structure pointer. long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); Is "inode" supported in IOCTLs? Also, is there any method by which I can add "inode" support to IOCTLs? Thanks.. |
|
| Author: | ganesha.ld [ Tue Feb 28, 2012 4:00 pm ] |
| Post subject: | Re: IOCTL with "inode" support for linux 2.6.39 |
Got the method to get the inode access through "ulocked_ioctl". http://lwn.net/Articles/119652/ Thanks!! |
|
| Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|



Forum