[Ilugc] Kernel struct info

  • From: cyborg4k@xxxxxxxxx (Shakthi Kannan)
  • Date: Wed Jan 12 13:07:06 2005

Hi,

--- Raja Mallik <raja.mallik@xxxxxxxxxxx> wrote:

Yes, for the time being..it has on 5 elements. They
are int type at this
moment.
 
You can use ioctl command to communicate with your
driver. 

User-space (application):
int ioctl(int fd, int cmd, ...);

Kernel-space (driver):
int (*ioctl) (struct inode *inode, struct file *filp,
         unsigned int cmd, unsigned long arg);

Since you want to get only one value, you can use:

__put_user(datum, ptr)

Check this link:
http://www.xml.com/ldd/chapter/book/ch05.html#t1

You might also want to check the scull example from
here:

http://examples.oreilly.com/linuxdrive2/

Regards,

K Shakthi

=====
--------------------------------------------------------------------------
K Shakthi
Specsoft (Hexaware Technologies), ASIC Design Center
http://www.geocities.com/shakthimaan
--------------------------------------------------------------------------


        
                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

Other related posts: