Re: Why is the 'loff_t *offset' parameter in the file_operations'read function a pointer?

From: Jiri Slaby
Date: Tue Apr 26 2011 - 08:31:06 EST


On 04/26/2011 01:58 PM, 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?

Because you are responsible for changing it appropriately.

is it in userspace?

Nope, in kernelspace.

I think this is described in LDD3, isn't it?

regards,
--
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/