Widen page count field in blockinfo to allow lots of pages per block
[yaffs/.git] / direct / dtest.c
index 6f32cb53d81ac028a86c20f00f08ae4df32de1db..9051c234fbb4c2820ef8380c6dfdacc875ef53d9 100644 (file)
@@ -64,6 +64,7 @@ void fill_disk(char *path,int nfiles)
        int h;
        int n;
        int result;
+       int f;
        
        char str[50];
        
@@ -77,7 +78,7 @@ void fill_disk(char *path,int nfiles)
                
                while ((result = yaffs_write(h,xx,600)) == 600)
                {
-                       //printf(".");
+                       f = yaffs_freespace("/boot");
                }
                result = yaffs_close(h);
                printf(" close %d\n",result);
@@ -660,6 +661,19 @@ int cache_bypass_bug_test(void)
 }
 
 
+int free_space_check(void)
+{
+       int f;
+       
+               yaffs_StartUp();
+               yaffs_mount("/boot");
+           fill_disk("/boot/",2);
+           f = yaffs_freespace("/boot");
+           
+           printf("%d free when disk full\n",f);           
+           return 1;
+}
+
 
 int main(int argc, char *argv[])
 {
@@ -667,6 +681,8 @@ int main(int argc, char *argv[])
        
        //return cache_read_test();
        
-       return cache_bypass_bug_test();
+       //return cache_bypass_bug_test();
+       
+       return free_space_check();
        
 }