Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: IOCTL with "inode" support for linux 2.6.39
PostPosted: Tue Feb 28, 2012 3:33 pm 
Offline

Joined: Mon Dec 19, 2011 7:01 pm
Posts: 25
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..


Top
 Profile  
 
 Post subject: Re: IOCTL with "inode" support for linux 2.6.39
PostPosted: Tue Feb 28, 2012 4:00 pm 
Offline

Joined: Mon Dec 19, 2011 7:01 pm
Posts: 25
Got the method to get the inode access through "ulocked_ioctl".

http://lwn.net/Articles/119652/

Thanks!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: