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=06d75819d09b6e868a91f55af8193d205d291948;hp=e896abcf6b24fff21755fcc11bebb81d46aabe01;hb=121c055437f23d9d6bc7b57d36ecf128b447013f;hpb=250248634f57704c06d3ae5050febb33ad5c67d8 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 e896abc..06d7581 100644 --- a/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c +++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.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 @@ -15,44 +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("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); }