Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: Why is the 'loff_t *offset' parameter in the file_operations' read function a pointer? | Date | Tue, 26 Apr 2011 14:37:53 +0200 |
| |
On Tuesday 26 April 2011, Amit Ben Shahar wrote: > (if i'm off topic or should look elsewhere i apologize - couldn't find > information anywhere) > I am coding a kernel module and implementing a file's operations, the > read operation received an loff_t *offset parameter, why is this a > pointer? is it in userspace?
The read function must update the offset independent of the return value. See simple_read_from_buffer() as an example.
Arnd
| |