yaffs: Fix yaffs_readdir when dereferencing a symlink
authorCharles Manning <cdhmanning@gmail.com>
Thu, 21 May 2015 05:27:01 +0000 (17:27 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 21 May 2015 05:31:26 +0000 (17:31 +1200)
commitc15797a48b5f133c37e9399546165525eebddc1c
treed4d17cfa442160e279e145542b29494d4cb23391
parent1ebec0597a033cba1b18b32466bbd6b7dcfdcecb
yaffs: Fix yaffs_readdir when dereferencing a symlink

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>
direct/yaffsfs.c