X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_open_ENAMETOOLONG.c;h=228f73614d0469a0101113570203fe7590afcf79;hp=44fd562dc041e771f7f8b3e2287e1a4b3af6b298;hb=6356b32783a8ec97b09f7090c3d10c8b88ea32e5;hpb=1c8604a29f8ca073e1f5129c58e201a4b42bc192 diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c index 44fd562..228f736 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c @@ -15,45 +15,40 @@ -static int handle=0; -int test_yaffs_open_ENAMETOOLONG(void){ - int output=0; - int x; - int error_code=0; - int file_name_length=1000000; +static int handle = -1; + +int test_yaffs_open_ENAMETOOLONG(void) +{ + int output = 0; + int x = 0; + int error_code = 0; + int file_name_length = 1000000; char file_name[file_name_length]; strcat(file_name,YAFFS_MOUNT_POINT); - for (x=strlen(YAFFS_MOUNT_POINT); x=0){ - printf("handle %d \n",handle); - printf("non existant file opened.(which is a bad thing)\n"); + } else { + //printf("handle %d \n",handle); + print_message("non existant file opened.(which is a bad thing)\n", 2); return -1; } - /* the program should not get here but the compiler is complaining */ - return -1; } -int test_yaffs_open_ENAMETOOLONG_clean(void){ +int test_yaffs_open_ENAMETOOLONG_clean(void) +{ if (handle >=0){ return yaffs_close(handle); }