Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package

off_t lseek ( int  desc,
off_t  offset,
int  whence 
)

Moves the file offset associated with desc.

Parameters:
desc The file descriptor
offset If whence is SEEK_SET, the descriptor offset is set to this value. If whence is SEEK_CUR, the descriptor offset is set to its current location plus this value. If whence is SEEK_END, the descriptor offset is set to the size of the file plus this value.
whence Directive for setting the descriptor offset.
Returns:
On success, lseek returns the resulting descriptor offset in bytes from the beginning of the file. On failure, it returns -1 and sets errno appropriately.

Definition at line 17 of file lseek.c.

References lseek().

Referenced by lseek().

                                                {
  off_t retval = NACL_SYSCALL(lseek)(desc, offset, whence);
  if ((int) retval < 0) {
    errno = -(int) retval;
    return (off_t) -1;
  }
  return retval;
}


Generated by  Doxygen 1.6.0   Back to index