Some cleanups, Linux 2.6.25 handling, fix handing of root permissions
[yaffs2.git] / direct / dtest.c
index 5b038c4b036c10971b8462d4567f890756c03b69..792c67ef35c539d7b5cd5a6021e723d9ba688101 100644 (file)
@@ -966,6 +966,7 @@ void rename_over_test(const char *mountpt)
        
 }
 
+
 int resize_stress_test(const char *path)
 {
    int a,b,i,j;
@@ -1029,6 +1030,28 @@ int resize_stress_test(const char *path)
    
 }
 
+int root_perm_remount(const char *path)
+{
+   struct yaffs_stat s;
+   
+   yaffs_StartUp();
+   
+   yaffs_mount(path);
+   
+   yaffs_stat(path,&s);
+   printf("root perms after mount %x\n",s.st_mode);
+   
+   yaffs_chmod(path, 0777);
+
+   yaffs_stat(path,&s);
+   printf("root perms after setting to 0777 is  %x\n",s.st_mode);
+   
+   yaffs_unmount(path);
+      
+   return 0;
+   
+}
+
 
 int resize_stress_test_no_grow_complex(const char *path,int iters)
 {
@@ -2259,7 +2282,8 @@ int main(int argc, char *argv[])
        
        //return cache_read_test();
        
-       //resize_stress_test_no_grow("/flash/flash",20);
+       // resize_stress_test_no_grow("/flash/flash",20);
+       //root_perm_remount("/flash/flash");
        
        //huge_directory_test_on_path("/ram2k");