X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_flush.c;h=c7380a6e6a90f5d2125ab7d2e83fa4c511f62679;hb=9a20a1043042ed312c6d076ba2369d9138354702;hp=de5ccde72b9ae8bb7742e73bf3188f98d83377de;hpb=98535c64952cac84919014d44f9fbe9bf7e1c31d;p=yaffs2.git diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush.c b/direct/timothy_tests/quick_tests/test_yaffs_flush.c index de5ccde..c7380a6 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_flush.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_flush.c @@ -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 @@ -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; + } }