projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs Yet more tests for quick tests.
[yaffs2.git]
/
direct
/
timothy_tests
/
quick_tests
/
test_yaffs_lseek_EINVAL.c
diff --git
a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c
b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c
index 173e1b5d04ed8169cedf11e5ad12c0d736b252b5..b03914e87279808b9fe0212320c099195de99b59 100644
(file)
--- a/
direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c
+++ b/
direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c
@@
-13,12
+13,20
@@
#include "test_yaffs_lseek_EINVAL.h"
#include "test_yaffs_lseek_EINVAL.h"
-int handle=
0
;
+int handle=
-1
;
int test_yaffs_lseek_EINVAL(void){
handle=test_yaffs_open();
int error_code=0;
int test_yaffs_lseek_EINVAL(void){
handle=test_yaffs_open();
int error_code=0;
- int output=yaffs_lseek(handle, 0, -1);
+ int output=0;
+
+ if (handle<0){
+ printf("failed to open file\n");
+ return -1;
+ }
+
+
+ output=yaffs_lseek(handle, 0, -1);
if (output<0){
error_code=yaffs_get_error();
if (output<0){
error_code=yaffs_get_error();