X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_truncate_EFBIG.c;h=0d698654916f3fe3a1a108379d55e818bf781cbe;hp=7ea85da00f06f532eec93151a8cb21b868d6379b;hb=a32621e0d7f5f391e9152cfe710fa6c99ca44c50;hpb=1c8604a29f8ca073e1f5129c58e201a4b42bc192 diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.c index 7ea85da..0d69865 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EFBIG.c @@ -12,9 +12,10 @@ */ #include "test_yaffs_truncate_EFBIG.h" -static int handle=0; +static int handle = -1; -int test_yaffs_truncate_EFBIG(void){ +int test_yaffs_truncate_EFBIG(void) +{ int error=0; int output=0; handle=test_yaffs_open(); @@ -24,24 +25,22 @@ int test_yaffs_truncate_EFBIG(void){ error=yaffs_get_error(); if (abs(error)==EINVAL){ /*in yaffs EINVAL is used instead of EFBIG */ return 1; - } - else { - printf("recieved a different error than expected\n"); + } else { + print_message("received a different error than expected\n",2); return -1; } - } - else{ - printf("truncated a file to a massive size\n"); + } else{ + print_message("truncated a file to a massive size\n",2); return -1; } - } - else { - printf("error opening file"); + } else { + print_message("error opening file\n",2); return -1; } } -int test_yaffs_truncate_EFBIG_clean(void){ +int test_yaffs_truncate_EFBIG_clean(void) +{ return 1; }