+void seek_overwrite_test(const char *mountpt,int nmounts)
+{
+
+ char a[30];
+
+ int i;
+ int j;
+
+ int h0;
+
+
+ sprintf(a,"%s/f",mountpt);
+
+ yaffs_StartUp();
+
+ yaffs_mount(mountpt);
+
+
+ for(i = 0; i < nmounts; i++){
+
+ h0 = yaffs_open(a, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
+
+ for(j = 0; j < 100000; j++){
+ yaffs_lseek(h0,0,SEEK_SET);
+ yaffs_write(h0,xx,5000);
+ yaffs_lseek(h0,0x100000,SEEK_SET);
+ yaffs_write(h0,xx,5000);
+
+ if(early_exit)
+ exit(0);
+ }
+
+ yaffs_close(h0);
+
+ }
+}
+
+