SPRUIG8J January 2018 – March 2024
Set File Position Indicator
off_t DEV_lseek (int dev_fd , off_t offset , int origin );
This function sets the file's position indicator for this file descriptor as lseek.
If lseek is supported, it should not allow a seek to before the beginning of the file, but it should support seeking past the end of the file. Such seeks do not change the size of the file, but if it is followed by a write, the file size will increase.
If successful, this function returns the new value of the file position indicator.
This function must return -1 to indicate an error if for some reason no bytes could be written to the file. For many devices, the lseek operation is nonsensical (e.g. a computer monitor).