X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Flib.c;fp=direct%2Ftimothy_tests%2Fquick_tests%2Flib.c;h=bc004043d11b33b87006fbe941feac8e220ac166;hp=a9aecf78bcfec571954a46202df59b74cef16454;hb=f1fdae08ffdfaa5d1a31b9c4303dc317fe95ded4;hpb=10d09f1cb066885e3934db0c2c7c86dd10cbc8bf diff --git a/direct/timothy_tests/quick_tests/lib.c b/direct/timothy_tests/quick_tests/lib.c index a9aecf7..bc00404 100644 --- a/direct/timothy_tests/quick_tests/lib.c +++ b/direct/timothy_tests/quick_tests/lib.c @@ -37,12 +37,31 @@ int get_exit_on_error(void) int set_up_ELOOP(void){ int output1=1; int output2=1; - if (0!=yaffs_access(ELOOP2)){ - output1=yaffs_symlink(ELOOP,ELOOP2); - } - if (0!=yaffs_access(ELOOP)){ - output2=yaffs_symlink(ELOOP2,ELOOP); + int error =0; + + output1=yaffs_symlink(ELOOP_PATH,ELOOP2_PATH); + if (output1 <0){ + error=yaffs_get_error(); + if (abs(error)==EEXIST){ + output1= 1; + } else { + output1=-1; + } + } + + output2=yaffs_symlink(ELOOP2_PATH,ELOOP_PATH); + + if (output2 <0){ + error=yaffs_get_error(); + if (abs(error)==EEXIST){ + output2= 1; + } else { + output2=-1; + } } + + + yaffs_set_error(0); /*reset the last error to 0 */ return (output1|output2); }