Re: pos != &file->f_pos

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

 



If a read operation has an offset different from the current one, it
means an implicit lseek. If the device doesn't support lseek an ESPIPE
error is return.

Regards,
Jaime Medrano.

On Mon, Jan 05, 2004 at 01:08:14PM +0100, Frank.A.Uepping@t-online.de wrote:
> Inside some file operations functions (read/write) I saw this:
> 
> size_t read(struct file *file, char *buf, size_t count loff_t *pos)
> {
> 	if (pos != &file->f_pos)
> 		return -ESPIPE;
> ...
> 
> What is this good for?
> 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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