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=29af47fc0b96b22a863e36c3908699354b5d55f7;hp=06d97646df8d0165fd0eee160cdf3e905bb07b94;hb=ce0a5fb9849b6dc0d1347709b28d3a34eefec662;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..29af47f 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.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 @@ -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; }