def sys_lseek(self, fd, offset, whence):
signed_offset = self._to_signed_dword(offset)<EOL>try:<EOL><INDENT>return self._get_fd(fd).seek(signed_offset, whence)<EOL><DEDENT>except FdError as e:<EOL><INDENT>logger.info(("<STR_LIT>"<EOL>"<STR_LIT>"))<EOL>return -e.err<EOL><DEDENT>
lseek - reposition read/write file offset

The lseek() function repositions the file offset of the open file description associated
with the file descriptor fd to the argument offset according to the directive whence


:param fd: a valid file descriptor
:param offset: the offset in bytes
:param whence: SEEK_SET: The file offset is set to offset bytes.
               SEEK_CUR: The file offset is set to its current location plus offset bytes.
               SEEK_END: The file offset is set to the size of the file plus offset bytes.

:return: offset from file beginning, or EBADF (fd is not a valid file descriptor or is not open)