If the directory is a symlink then follow the symlink.
eg
yaffs_mount("/nand/");
yaffs_symlink("x", "/nand/sym");
yaffs_mkdir("/nand/x",0666);
After that:
yaffs_opendir("/nand/sym/") works, but opendir("/nand/sym") fails because the
symlink itself is found. Fix by dereferencing the symlink in yaffs_opendir().
Thanks to Trent Lillehaugen for finding that.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
}
obj = yaffsfs_FindObject(reldir, dirname, 0, 1, NULL, ¬Dir, &loop);
+ obj = yaffsfs_FollowLink(obj, 0, &loop);
if (!obj && notDir)
yaffsfs_SetError(-ENOTDIR);