Go to the previous, next section.
off_t lseek(int fd, off_t offset, int whence);
fd: [in] the file descriptor to manipulate.
offset: [in] the offset modificator.
whence: [in] indicates how to modify the offset.
Changes the read/write file offset of a file descriptor. The offset parameter is interpreted according to the possible following values of whence:
SEEK_SET
SEEK_CUR
SEEK_END
If we seek past the end of a file, the new file region contain 0.
On success, the call returns the new file offset. On errror, it returns
-1 and sets errno
to one of the following values:
EINVAL
: whence does not have a valid value.
EBADF
.
Go to the previous, next section.