int fseek(FILE *fd, off_t offset, int whence) { if (filedesc_seek(fd, offset, whence) < 0) return -1; return 0; // fseek() returns 0 on success, not the new position }
off_t lseek(int fn, off_t offset, int whence) { return filedesc_seek(&files->fd[fn], offset, whence); }