projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix M18 driver for 64-bit systems
[yaffs2.git]
/
direct
/
timothy_tests
/
quick_tests
/
test_yaffs_flush.c
diff --git
a/direct/timothy_tests/quick_tests/test_yaffs_flush.c
b/direct/timothy_tests/quick_tests/test_yaffs_flush.c
index de5ccde72b9ae8bb7742e73bf3188f98d83377de..c7380a6e6a90f5d2125ab7d2e83fa4c511f62679 100644
(file)
--- 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.
*
/*
* YAFFS: Yet another FFS. A NAND-flash specific file system.
*
- * Copyright (C) 2002-201
0
Aleph One Ltd.
+ * Copyright (C) 2002-201
1
Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Timothy Manning <timothy@yaffs.net>
* 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 test_yaffs_flush(void)
{
- int output=
0
;
+ int output=
-1
;
handle = test_yaffs_open();
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)
{
}
int test_yaffs_flush_clean(void)
{
- return yaffs_close(handle);
+ if (handle>=0){
+ return yaffs_close(handle);
+ } else {
+ return -1;
+ }
}
}