/*
* 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>
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;
+ }
}