yaffs Yet more tests for quick tests.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_lseek_EFBIG.c
index 4822499d217eeef56c14d3404736022408a76c7c..5a001bb6f1f204661a6186e6cc791ecd31c00c09 100644 (file)
 
 #include "test_yaffs_lseek_EFBIG.h"
 
-static int handle=0;
+static int handle=-1;
 
 int test_yaffs_lseek_EFBIG(void){
        handle=test_yaffs_open();
        int error_code=0;
-       int output=yaffs_lseek(handle, 100000000000000000000000000000000000000, SEEK_SET);
+       int output=0;
+
+       if (handle<0){
+               printf("failed to open file\n");
+               return -1;
+       }
+       
+       yaffs_lseek(handle, 100000000000000000000000000000000000000, SEEK_SET);
 
        if (output<0){
                error_code=yaffs_get_error();