I think the problem is in YAFFS unlink & readdir implementation.
Please see the attached test program. It should list & remove all
files in working directory. Try create/touch some file in directory
and run this program. If current directory contain >192 files, the
second readdir will not list all files.
Joe.C
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
int main (int argc, char *argv[])
{
DIR *dir;
struct dirent *dirent;
dir = opendir (".");
while ((dirent = readdir (dir)) != NULL) {
if(dirent->d_name[0] == '.')
continue;
printf ("file %s exists\n", dirent->d_name);
}
closedir (dir);
dir = opendir (".");
while ((dirent = readdir (dir)) != NULL) {
if(dirent->d_name[0] == '.')
continue;
printf ("remove %s\n", dirent->d_name);
unlink (dirent->d_name);
}
closedir (dir);
return 0;
}