Merge branch 'big-files': Merge in large file support
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_symlink.c
index 570136e01224804dc49f5a8d1d7b5e9db1c2cb61..be7405721aaba4cd287443a18efa6284e33a4d19 100644 (file)
@@ -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 <timothy@yaffs.net>
@@ -17,6 +17,13 @@ static int output = 0;
 
 int test_yaffs_symlink(void)
 {
+       if (0 == yaffs_access(SYMLINK_PATH,0)){
+               output=yaffs_unlink(SYMLINK_PATH);
+               if (output<0){
+                       print_message("failed to unlink symlink\n",2);
+                       return -1;
+               }
+       }
        output = yaffs_symlink(FILE_PATH,SYMLINK_PATH);
        return output;
 }