Skip to content

dfs_win32: add seekdir support, fix #346 #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 2, 2015

Conversation

prife
Copy link
Contributor

@prife prife commented Feb 2, 2015

test case

int testdir()
{
    DIR * dir;
    struct dirent * ptr;
    int offset = 0, offset_5 = 0, i = 0;
    dir = opendir("/");
    while ((ptr = readdir(dir))!=NULL)
    {
        offset = telldir(dir);
        if(++i == 5) offset_5 = offset;
        rt_kprintf("d_name :%s offset :%d \n", ptr->d_name, offset);
    }
    seekdir(dir, offset_5);
    rt_kprintf("Readdir again!\n");
    while ((ptr = readdir(dir))!=NULL)
    {
        offset = telldir(dir);
        rt_kprintf("d_name :%s offset :%d\n", ptr->d_name, offset);
    }

    closedir(dir);
    return 0;
}

@prife prife changed the title dfs_win32: add seekdir support, fix #364 dfs_win32: add seekdir support, fix #346 Feb 2, 2015
BernardXiong added a commit that referenced this pull request Feb 2, 2015
dfs_win32: add seekdir support, fix #346
@BernardXiong BernardXiong merged commit 1158fba into RT-Thread:master Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants