yaffs Adding more error code test programs to quick tests. note the bugs are still...
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_open.c
1 #include "test_yaffs_open.h"
2
3 static int handle=0;
4
5 int test_yaffs_open(void){
6
7         handle=yaffs_open(FILE_PATH,O_CREAT | O_TRUNC| O_RDWR, FILE_MODE);
8         return handle;
9 }
10
11
12 int test_yaffs_open_clean(void){
13         if (handle >=0){
14                 return yaffs_close(handle);
15         }
16         else {
17                 return 1;       /* the file failed to open so there is no need to close it*/
18         }
19 }
20