#endif
+void (*ext_fatal)(void) = NULL;
+
static unsigned powerUps;
static unsigned cycleStarts;
static unsigned cycleEnds;
static void FatalError(int lineNo)
{
printf("Integrity error %d\n",lineNo);
+ if(ext_fatal)
+ ext_fatal();
+
while(1){
sleep(1);
}
yaffs_dirent *de;
struct yaffs_stat s;
char str[1000];
+ int error_line = 0;
d = yaffs_opendir(dname);
printf("%s inode %ld %d obj %x length %d mode %X ",str, de->d_ino, s.st_ino,de->d_dont_use,(int)s.st_size,s.st_mode);\
if(de->d_ino != s.st_ino){
printf(" \n\n!!!! HEY inode mismatch\n\n");
- FatalError(__LINE__);
+ error_line = __LINE__;
}
switch(s.st_mode & S_IFMT)
dump_directory_tree_worker(str,1);
if(s.st_ino > 10000)
- FatalError(__LINE__);
+ error_line = __LINE__;
}
+ if(error_line)
+ FatalError(error_line);
+
yaffs_closedir(d);
}