/* this function is a POSIX compliant version, which will set position of next directory structure in the directory stream. */
void seekdir(DIR *d, long offset)
/* this function is a POSIX compliant version, which will set position of next directory structure in the directory stream. */
void seekdir(DIR *d, long offset)
{
    struct dfs_file *fd;
    fd = fd_get(d->fd);
    if (fd == NULL)
    {
        rt_set_errno(-EBADF);
        return ;
    }
    if (dfs_file_lseek(fd, offset) >= 0)
        d->num = d->cur = 0;
}