file_operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

For kernel 2.6.22.6 : I can see that tyoe of 2nd arg for read function
in strucy file_operations is changed is little bit changed from 2.4
kernel.

 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);

For 2.4 it used to be:

 ssize_t (*read) (struct file *, char *, size_t, loff_t *);

So what does extra __user specify here.

If I have to use this function of reading file inside the kernel, then
shall I pass kernel buffer to it or user space buffer ?

I know that it is VERY BAD idea to read from kernel. But how are we
suppposed to do it if at all.

Sachin

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux