yaffs: Remove tags validity checking code.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_flush.c
index de5ccde72b9ae8bb7742e73bf3188f98d83377de..c7380a6e6a90f5d2125ab7d2e83fa4c511f62679 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
@@ -17,15 +17,23 @@ static int handle =-1;
 
 int test_yaffs_flush(void)
 {
-       int output=0;
+       int output=-1;
        handle = test_yaffs_open();
-       output =yaffs_flush(handle);
-       
+       if (handle >= 0){
+               output =yaffs_flush(handle);
+       } else {
+               print_message("failed to open file\n",2);
+       }
+       return output;
 }
 
 
 int test_yaffs_flush_clean(void)
 {
-       return yaffs_close(handle);
+       if (handle>=0){
+               return yaffs_close(handle);
+       } else {
+               return -1;
+       }
 }