Lines Matching defs:fn

63 void make_pattern_file(char *fn,int size)
68 outh = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
82 int check_pattern_file(char *fn)
90 h = yaffs_open(fn, O_RDWR,0);
101 fn,size,i,marker,~i);
112 int dump_file_data(char *fn)
121 h = yaffs_open(fn, O_RDWR,0);
124 printf("%s\n",fn);
142 void dump_file(const char *fn)
148 h = yaffs_open(fn,O_RDONLY,0);
151 printf("*****\nDump file %s does not exist\n",fn);
156 printf("*****\nDump file %s size %d\n",fn,size);
164 void create_file_of_size(const char *fn,int syze)
171 int iterations = (syze + strlen(fn) -1)/ strlen(fn);
173 h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
177 sprintf(xx,"%s %8d",fn,iterations);
184 void verify_file_of_size(const char *fn,int syze)
193 int iterations = (syze + strlen(fn) -1)/ strlen(fn);
195 h = yaffs_open(fn, O_RDONLY, S_IREAD | S_IWRITE);
199 sprintf(xx,"%s %8d",fn,iterations);
206 printf("=====>>>>> verification of file %s failed near position %d\n",fn,yaffs_lseek(h,0,SEEK_CUR));
213 void create_resized_file_of_size(const char *fn,int syze1,int reSyze, int syze2)
221 h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
223 iterations = (syze1 + strlen(fn) -1)/ strlen(fn);
226 yaffs_write(h,fn,strlen(fn));
233 iterations = (syze2 + strlen(fn) -1)/ strlen(fn);
236 yaffs_write(h,fn,strlen(fn));
247 char fn[100];
249 sprintf(fn,"%s/%s",path,"f1");
250 create_file_of_size(fn,10000);
252 sprintf(fn,"%s/%s",path,"fdel");
253 create_file_of_size(fn,10000);
254 yaffs_unlink(fn);
256 sprintf(fn,"%s/%s",path,"f2");
258 create_resized_file_of_size(fn,10000,3000,4000);
263 char fn[100];
271 sprintf(fn,"%s/ddd",path);
273 yaffs_mkdir(fn,0);
275 do_some_file_stuff(fn);
287 char fn[100];
300 sprintf(fn,"%s/ff%d",path,i);
302 h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IWRITE | S_IREAD);
316 char fn[100];
318 sprintf(fn,"%s/%s",path,"f1");
327 make_a_file(fn,1,fsize);
338 char fn[3][100];
341 sprintf(fn[0],"%s/%s",path,"f0");
342 sprintf(fn[1],"%s/%s",path,"f1");
343 sprintf(fn[2],"%s/%s",path,"f2");
355 result = dump_file_data(fn[j]);
356 result = check_pattern_file(fn[j]);
357 make_pattern_file(fn[j],fsize);
358 result = dump_file_data(fn[j]);
359 result = check_pattern_file(fn[j]);
1563 char fn[100];
1587 sprintf(fn,"%s/%d",p,i);
1591 h = yaffs_open(fn,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
1593 yaffs_write(h,fn,100);
1597 yaffs_mkdir(fn,0);
1602 sprintf(fn,"%s/%d",p,i);
1604 yaffs_unlink(fn);
1606 yaffs_rmdir(fn);
1627 void write_200k_file(const char *fn, const char *fdel, const char *fdel1)
1633 h1 = yaffs_open(fn, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
1664 void verify_200k_file(const char *fn)
1672 h1 = yaffs_open(fn, O_RDONLY, 0);
1679 printf("File %s verification failed at %d\n",fn,i);
1765 void yaffs_touch(const char *fn)
1767 yaffs_chmod(fn, S_IREAD | S_IWRITE);