/* Change Logs: Date Author Notes  Bernard first version  Jianjia Ma add msh cmd  */
void seekdir_test(void)
/* Change Logs: Date Author Notes  Bernard first version  Jianjia Ma add msh cmd  */
void seekdir_test(void)
{
    DIR * dirp;
    long save3 = 0;
    int i = 0;
    struct dirent *dp;
    dirp = opendir ("/");
    save3 = telldir(dirp);
    for (dp = readdir(dirp); dp != RT_NULL; dp = readdir(dirp))
    {
        rt_kprintf("direntry: %s\n", dp->d_name);
        if (i++ == 3)
        {
            save3 = telldir(dirp);
        }
    }
    seekdir (dirp, save3);
    rt_kprintf("seek dientry to: %d\n", save3);
    for (dp = readdir(dirp); dp != RT_NULL; dp = readdir(dirp))
    {
        rt_kprintf("direntry: %s\n", dp->d_name);
    }
    closedir (dirp);
}