X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_lseek_EBADF.c;h=c6f4264e345944d0d862ab3f9e97ab7abccd14ed;hp=06d97646df8d0165fd0eee160cdf3e905bb07b94;hb=050a7702e4c058234102772f12846e7a878ca769;hpb=22f31a41cbb9a08e67204279fb3b37e400309f1c diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c index 06d9764..c6f4264 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c @@ -14,26 +14,27 @@ #include "test_yaffs_lseek_EBADF.h" -int test_yaffs_lseek_EBADF(void){ +int test_yaffs_lseek_EBADF(void) +{ int error_code=0; int output=yaffs_lseek(-1, 0, SEEK_SET); + if (output<0){ error_code=yaffs_get_error(); - //printf("EISDIR def %d, Error code %d\n", ENOTDIR,error_code); if (abs(error_code)==EBADF){ return 1; - } - else { - printf("different error than expected\n"); + } else { + print_message("different error than expected\n", 2); return -1; } - } - else { - printf("lseeked to a negative position\n"); + } else { + print_message("lseeked to a negative position\n", 2); + return -1; } } -int test_yaffs_lseek_EBADF_clean(void){ +int test_yaffs_lseek_EBADF_clean(void) +{ return 1; }