yaffs More quick tests and have also fixed a bugin yaffs_mount function.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_mount_ENAMETOOLONG.c
index 99102c9f6eca8533e4a44b9d60f7643e382f8599..da12b1e3bf33660619380b25c0daeeac444d72de 100644 (file)
@@ -30,8 +30,8 @@ int test_yaffs_mount_ENAMETOOLONG(void){
                return -1;
        } 
 
-       strcat(file_name,YAFFS_MOUNT_POINT);
-       for (x=strlen(YAFFS_MOUNT_POINT); x<file_name_length -1; x++){
+
+       for (x=0; x<file_name_length -1; x++){
                file_name[x]='a';
        }
        file_name[file_name_length-2]='\0';
@@ -41,7 +41,7 @@ int test_yaffs_mount_ENAMETOOLONG(void){
 
        output=yaffs_mount(file_name);
 
-       if (output==-1){
+       if (output<0){
                error_code=yaffs_get_error();
                if (abs(error_code)== ENAMETOOLONG){
                        return 1;