EmbLogic's Blog

STATUS: Char DD

Completed: open, close, read (single quantum, multiple quantum),write(single quantum, multiple quantum),semaphore(syn tech),LSEEK.
Working: Completion, IOCTL.
earlier
ioctl (struct inode * inode, struct file * filp, unsigned int cmd, unsigned long arg)

In 2.6.x the ioctl is divided in to 2
compact_ioctl (struct file * filp, unsigned int cmd, unsigned long arg )
it is used when a 32 bit application is called in 64 bit, so it will provide the required mapping born due to the different architecture of 32 and 64 bit.

unlocked_ioctl (struct file * filp, unsigned int cmd, unsigned long arg )

In earlier version the (struct inode * ) parameter was used to fetch the device info from filp->private_data. but now it has been removed.
It is provided as filp->f_dentry->d_inode

plus in
struct file_operations
{
ioctl:my_ioctl,

use
compact_ioctl: my_ioctl,
unlocked_ioctl: my_ioctl,
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>