summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Manning <tfhmanning@gmail.com>2011-12-08 11:01:43 +1300
committerTimothy Manning <tfhmanning@gmail.com>2011-12-08 11:01:43 +1300
commitd7388fb75a13610d14d0afc397f826bd44c972e1 (patch)
tree9119aa4f41683a197f3ebc93f1352f19dcf2298e
parent8cbfc1e273db791447911631e80c0495c6171ca8 (diff)
parentd43e901b5bf74d8d40dda18f0d5da15c76245510 (diff)
Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
-rw-r--r--Kconfig_multi (renamed from Kconfig)24
-rw-r--r--Kconfig_single30
-rw-r--r--Makefile6
-rw-r--r--Makefile.kernel3
-rw-r--r--direct/basic-test/Makefile10
-rw-r--r--direct/basic-test/dtest.c1123
-rw-r--r--direct/basic-test/yaffs_fileem.c2
-rw-r--r--direct/basic-test/yaffs_fileem2k.c17
-rw-r--r--direct/basic-test/yaffs_fileem2k.h2
-rw-r--r--direct/basic-test/yaffs_norif1.c8
-rw-r--r--direct/basic-test/yaffs_norif1.h2
-rw-r--r--direct/basic-test/yaffs_osglue.c8
-rw-r--r--direct/basic-test/yaffs_ramdisk.c2
-rw-r--r--direct/basic-test/yaffs_ramdisk.h2
-rw-r--r--direct/basic-test/yaffs_ramem2k.c4
-rw-r--r--direct/basic-test/yaffscfg.c2
-rw-r--r--direct/basic-test/yaffscfg2k.c2
-rw-r--r--direct/basic-test/yaffsnewcfg.c2
-rw-r--r--direct/basic-test/ynorsim.c2
-rw-r--r--direct/basic-test/ynorsim.h2
-rw-r--r--direct/basic-test/yramsim.c2
-rw-r--r--direct/basic-test/yramsim.h2
-rw-r--r--direct/python/Makefile6
-rw-r--r--direct/python/examples.py7
-rw-r--r--direct/python/yaffs_python_helper.c2
-rw-r--r--direct/python/yaffsfs.py10
-rw-r--r--direct/tests/Makefile10
-rw-r--r--direct/tests/fuzzer.c2
-rw-r--r--direct/tests/nor_stress.c2
-rw-r--r--direct/tests/nor_stress.h2
-rw-r--r--direct/tests/yaffs_test.c2
-rw-r--r--direct/timothy_tests/dev/Makefile39
-rw-r--r--direct/timothy_tests/dev/error_handler.c2
-rw-r--r--direct/timothy_tests/dev/error_handler.h2
-rw-r--r--direct/timothy_tests/dev/message_buffer.c2
-rw-r--r--direct/timothy_tests/dev/message_buffer.h2
-rw-r--r--direct/timothy_tests/dev/yaffs_tester.c2
-rw-r--r--direct/timothy_tests/dev/yaffs_tester.h2
-rw-r--r--direct/timothy_tests/handle_tests/Makefile4
-rw-r--r--direct/timothy_tests/handle_tests/handle_test.c2
-rw-r--r--direct/timothy_tests/handle_tests/handle_test.h2
-rw-r--r--direct/timothy_tests/mirror_tests/Makefile4
-rw-r--r--direct/timothy_tests/mirror_tests/lib.c2
-rw-r--r--direct/timothy_tests/mirror_tests/lib.h2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_open.c2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_open.h2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_truncate.c2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_truncate.h2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_unlink.c2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_unlink.h2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_write.c2
-rw-r--r--direct/timothy_tests/mirror_tests/linux_test_write.h2
-rw-r--r--direct/timothy_tests/mirror_tests/mirror_tests.c2
-rw-r--r--direct/timothy_tests/mirror_tests/mirror_tests.h2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_open.c2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_open.h2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_truncate.c2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_truncate.h2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_unlink.c2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_unlink.h2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_write.c2
-rw-r--r--direct/timothy_tests/mirror_tests/yaffs_test_write.h2
-rw-r--r--direct/timothy_tests/quick_tests/Makefile4
-rw-r--r--direct/timothy_tests/quick_tests/lib.c2
-rw-r--r--direct/timothy_tests/quick_tests/lib.h2
-rw-r--r--direct/timothy_tests/quick_tests/quick_tests.c2
-rw-r--r--direct/timothy_tests/quick_tests/quick_tests.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_dup.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_dup.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_flush.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_flush.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fstat.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fstat.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fsync.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fsync.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_open_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_read.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_read.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.h2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write_big_file.c2
-rw-r--r--direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h2
-rw-r--r--direct/timothy_tests/threading/Makefile4
-rw-r--r--direct/timothy_tests/threading/lib.c2
-rw-r--r--direct/timothy_tests/threading/lib.h2
-rw-r--r--direct/timothy_tests/threading/test_a.c2
-rw-r--r--direct/timothy_tests/threading/test_a.h2
-rw-r--r--direct/timothy_tests/threading/test_b.c2
-rw-r--r--direct/timothy_tests/threading/test_b.h2
-rw-r--r--direct/timothy_tests/threading/thread_function.c2
-rw-r--r--direct/timothy_tests/threading/thread_function.h2
-rw-r--r--direct/timothy_tests/threading/threading.c2
-rw-r--r--direct/timothy_tests/threading/threading.h2
-rw-r--r--direct/yaffs_attribs.c2
-rw-r--r--direct/yaffs_error.c2
-rw-r--r--direct/yaffs_flashif.c2
-rw-r--r--direct/yaffs_flashif.h2
-rw-r--r--direct/yaffs_flashif2.h2
-rw-r--r--direct/yaffs_hweight.c10
-rw-r--r--direct/yaffs_hweight.h2
-rw-r--r--direct/yaffs_list.h2
-rw-r--r--direct/yaffs_nandemul2k.h2
-rw-r--r--direct/yaffs_nandif.c8
-rw-r--r--direct/yaffs_nandif.h2
-rw-r--r--direct/yaffs_osglue.h6
-rw-r--r--direct/yaffscfg.h2
-rw-r--r--direct/yaffsfs.c245
-rw-r--r--direct/yaffsfs.h29
-rw-r--r--direct/ydirectenv.h14
-rw-r--r--direct/yportenv.h40
-rwxr-xr-xlinux-tests/plot_data.sh23
-rw-r--r--linux-tests/xattrtest.c2
-rw-r--r--moduleconfig.h62
-rw-r--r--mtdemul/nandemul2k.c2
-rwxr-xr-xpatch-ker.sh8
-rw-r--r--patches/yaffs_linux_allocator.c22
-rw-r--r--patches/yaffs_mtdif2.c12
-rw-r--r--utils/Makefile33
-rw-r--r--utils/mkyaffs2image.c32
-rw-r--r--utils/mkyaffsimage.c45
-rw-r--r--utils/yutilsenv.h (renamed from yaffs_tagsvalidity.h)21
-rw-r--r--yaffs_allocator.c203
-rw-r--r--yaffs_allocator.h2
-rw-r--r--yaffs_attribs.c2
-rw-r--r--yaffs_attribs.h2
-rw-r--r--yaffs_bitmap.c11
-rw-r--r--yaffs_bitmap.h2
-rw-r--r--yaffs_checkptrw.c143
-rw-r--r--yaffs_checkptrw.h2
-rw-r--r--yaffs_ecc.c37
-rw-r--r--yaffs_ecc.h8
-rw-r--r--yaffs_getblockinfo.h4
-rw-r--r--yaffs_guts.c2277
-rw-r--r--yaffs_guts.h317
-rw-r--r--yaffs_linux.h6
-rw-r--r--yaffs_mtdif.c11
-rw-r--r--yaffs_mtdif.h2
-rw-r--r--yaffs_mtdif1.h8
-rw-r--r--yaffs_mtdif1_multi.c88
-rw-r--r--yaffs_mtdif1_single.c66
-rw-r--r--yaffs_mtdif2.h8
-rw-r--r--yaffs_mtdif2_multi.c24
-rw-r--r--yaffs_mtdif2_single.c104
-rw-r--r--yaffs_nameval.c56
-rw-r--r--yaffs_nameval.h2
-rw-r--r--yaffs_nand.c56
-rw-r--r--yaffs_nand.h6
-rw-r--r--yaffs_packedtags1.c19
-rw-r--r--yaffs_packedtags1.h2
-rw-r--r--yaffs_packedtags2.c95
-rw-r--r--yaffs_packedtags2.h2
-rw-r--r--yaffs_summary.c252
-rw-r--r--yaffs_summary.h37
-rw-r--r--yaffs_tagscompat.c103
-rw-r--r--yaffs_tagscompat.h8
-rw-r--r--yaffs_tagsvalidity.c27
-rw-r--r--yaffs_trace.h6
-rw-r--r--yaffs_verify.c75
-rw-r--r--yaffs_verify.h2
-rw-r--r--yaffs_vfs_multi.c147
-rw-r--r--yaffs_vfs_single.c676
-rw-r--r--yaffs_yaffs1.c141
-rw-r--r--yaffs_yaffs1.h2
-rw-r--r--yaffs_yaffs2.c1149
-rw-r--r--yaffs_yaffs2.h2
-rw-r--r--yportenv_multi.h19
-rw-r--r--yportenv_single.h22
566 files changed, 4475 insertions, 4659 deletions
diff --git a/Kconfig b/Kconfig_multi
index 6354140..658feea 100644
--- a/Kconfig
+++ b/Kconfig_multi
@@ -1,23 +1,23 @@
#
-# YAFFS file system configurations
+# yaffs file system configurations
#
config YAFFS_FS
- tristate "YAFFS2 file system support"
+ tristate "yaffs2 file system support"
default n
depends on MTD_BLOCK
select YAFFS_YAFFS1
select YAFFS_YAFFS2
help
- YAFFS2, or Yet Another Flash Filing System, is a filing system
+ yaffs2, or Yet Another Flash File System, is a file system
optimised for NAND Flash chips.
- To compile the YAFFS2 file system support as a module, choose M
+ To compile the yaffs2 file system support as a module, choose M
here: the module will be called yaffs2.
If unsure, say N.
- Further information on YAFFS2 is available at
+ Further information on yaffs2 is available at
<http://www.aleph1.co.uk/yaffs/>.
config YAFFS_YAFFS1
@@ -25,7 +25,7 @@ config YAFFS_YAFFS1
depends on YAFFS_FS
default y
help
- Enable YAFFS1 support -- yaffs for 512 byte / page devices
+ Enable yaffs1 support -- yaffs for 512 byte / page devices
Not needed for 2K-page devices.
@@ -49,11 +49,11 @@ config YAFFS_9BYTE_TAGS
If unsure, say N.
config YAFFS_DOES_ECC
- bool "Lets Yaffs do its own ECC"
+ bool "Lets yaffs do its own ECC"
depends on YAFFS_FS && YAFFS_YAFFS1 && !YAFFS_9BYTE_TAGS
default n
help
- This enables Yaffs to use its own ECC functions instead of using
+ This enables yaffs to use its own ECC functions instead of using
the ones from the generic MTD-NAND driver.
If unsure, say N.
@@ -74,7 +74,7 @@ config YAFFS_YAFFS2
depends on YAFFS_FS
default y
help
- Enable YAFFS2 support -- yaffs for >= 2K bytes per page devices
+ Enable yaffs2 support -- yaffs for >= 2K bytes per page devices
If unsure, say Y.
@@ -91,11 +91,11 @@ config YAFFS_AUTO_YAFFS2
If unsure, say Y.
config YAFFS_DISABLE_TAGS_ECC
- bool "Disable YAFFS from doing ECC on tags by default"
+ bool "Disable yaffs from doing ECC on tags by default"
depends on YAFFS_FS && YAFFS_YAFFS2
default n
help
- This defaults Yaffs to using its own ECC calculations on tags instead of
+ This defaults yaffs to using its own ECC calculations on tags instead of
just relying on the MTD.
This behavior can also be overridden with tags_ecc_on and
tags_ecc_off mount options.
@@ -107,7 +107,7 @@ config YAFFS_ALWAYS_CHECK_CHUNK_ERASED
depends on YAFFS_FS
default n
help
- Normally YAFFS only checks chunks before writing until an erased
+ Normally yaffs only checks chunks before writing until an erased
chunk is found. This helps to detect any partially written
chunks that might have happened due to power loss.
diff --git a/Kconfig_single b/Kconfig_single
new file mode 100644
index 0000000..bd6e8df
--- /dev/null
+++ b/Kconfig_single
@@ -0,0 +1,30 @@
+#
+# yaffs file system configurations
+#
+
+config YAFFS_FS
+ tristate "yaffs2 file system support"
+ default n
+ depends on MTD_BLOCK
+ select YAFFS_YAFFS1
+ select YAFFS_YAFFS2
+ help
+ yaffs2, or Yet Another Flash File System, is a file system
+ optimised for NAND Flash chips.
+
+ To compile the yaffs2 file system support as a module, choose M
+ here: the module will be called yaffs2.
+
+ If unsure, say N.
+
+ Further information on yaffs2 is available at
+ <http://www.aleph1.co.uk/yaffs/>.
+
+config YAFFS_DEBUG
+ bool "Enable yaffs debugging"
+ depends on YAFFS_FS
+ default n
+ help
+ Enable the yaffs debugging tracing.
+
+ If unsure, say N.
diff --git a/Makefile b/Makefile
index 1dbafc6..db1b5c2 100644
--- a/Makefile
+++ b/Makefile
@@ -30,25 +30,27 @@ ifneq ($(KERNELRELEASE),)
yaffs2-objs += yaffs_mtdif1_single.o yaffs_packedtags1.o
yaffs2-objs += yaffs_ecc.o yaffs_vfs_single.o yaffs_guts.o
yaffs2-objs += yaffs_packedtags2.o
- yaffs2-objs += yaffs_tagscompat.o yaffs_tagsvalidity.o
+ yaffs2-objs += yaffs_tagscompat.o
yaffs2-objs += yaffs_checkptrw.o yaffs_nand.o
yaffs2-objs += yaffs_checkptrw.o yaffs_nand.o yaffs_nameval.o
yaffs2-objs += yaffs_allocator.o yaffs_bitmap.o yaffs_attribs.o
yaffs2-objs += yaffs_yaffs1.o
yaffs2-objs += yaffs_yaffs2.o
yaffs2-objs += yaffs_verify.o
+ yaffs2-objs += yaffs_summary.o
yaffs2multi-objs := yaffs_mtdif.o yaffs_mtdif2_multi.o
yaffs2multi-objs += yaffs_mtdif1_multi.o yaffs_packedtags1.o
yaffs2multi-objs += yaffs_ecc.o yaffs_vfs_multi.o yaffs_guts.o
yaffs2multi-objs += yaffs_packedtags2.o
- yaffs2multi-objs += yaffs_tagscompat.o yaffs_tagsvalidity.o
+ yaffs2multi-objs += yaffs_tagscompat.o
yaffs2multi-objs += yaffs_checkptrw.o yaffs_nand.o
yaffs2multi-objs += yaffs_checkptrw.o yaffs_nand.o yaffs_nameval.o
yaffs2multi-objs += yaffs_allocator.o yaffs_bitmap.o yaffs_attribs.o
yaffs2multi-objs += yaffs_yaffs1.o
yaffs2multi-objs += yaffs_yaffs2.o
yaffs2multi-objs += yaffs_verify.o
+ yaffs2multi-objs += yaffs_summary.o
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
diff --git a/Makefile.kernel b/Makefile.kernel
index e63a28a..6a8729c 100644
--- a/Makefile.kernel
+++ b/Makefile.kernel
@@ -6,12 +6,13 @@ obj-$(CONFIG_YAFFS_FS) += yaffs.o
yaffs-y := yaffs_ecc.o yaffs_vfs.o yaffs_guts.o yaffs_checkptrw.o
yaffs-y += yaffs_packedtags1.o yaffs_packedtags2.o yaffs_nand.o
-yaffs-y += yaffs_tagscompat.o yaffs_tagsvalidity.o
+yaffs-y += yaffs_tagscompat.o
yaffs-y += yaffs_mtdif.o yaffs_mtdif1.o yaffs_mtdif2.o
yaffs-y += yaffs_nameval.o yaffs_attribs.o
yaffs-y += yaffs_allocator.o
yaffs-y += yaffs_yaffs1.o
yaffs-y += yaffs_yaffs2.o
yaffs-y += yaffs_bitmap.o
+yaffs-y += yaffs_summary.o
yaffs-y += yaffs_verify.o
diff --git a/direct/basic-test/Makefile b/direct/basic-test/Makefile
index 214f4e9..afe0ef0 100644
--- a/direct/basic-test/Makefile
+++ b/direct/basic-test/Makefile
@@ -36,7 +36,7 @@ CFLAGS+= -DCONFIG_YAFFS_USE_PTHREADS -lpthread
COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o yaffs_attribs.o \
yaffs_norif1.o ynorsim.o \
@@ -44,7 +44,8 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
yaffs_bitmap.o \
yaffs_yaffs1.o \
yaffs_yaffs2.o \
- yaffs_verify.o
+ yaffs_verify.o \
+ yaffs_summary.o
# yaffs_checkptrwtest.o\
@@ -52,14 +53,15 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
yaffs_nameval.c yaffs_nameval.h \
yaffs_trace.h yaffs_attribs.h \
yaffs_allocator.c yaffs_allocator.h \
yaffs_yaffs1.c yaffs_yaffs1.h \
yaffs_yaffs2.c yaffs_yaffs2.h \
yaffs_bitmap.c yaffs_bitmap.h \
- yaffs_verify.c yaffs_verify.h
+ yaffs_verify.c yaffs_verify.h \
+ yaffs_summary.c yaffs_summary.h
YAFFSDIRECTSYMLINKS = yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
yaffsfs.h yaffs_osglue.h ydirectenv.h \
diff --git a/direct/basic-test/dtest.c b/direct/basic-test/dtest.c
index e6a0a14..fa48158 100644
--- a/direct/basic-test/dtest.c
+++ b/direct/basic-test/dtest.c
@@ -1,7 +1,7 @@
/*
- * YAFFS: Yet another FFS. A NAND-flash specific file system.
+ * 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 Charles Manning <charles@aleph1.co.uk>
@@ -36,7 +36,7 @@ void copy_in_a_file(const char *yaffsName,const char *inName)
int ni,no;
inh = open(inName,O_RDONLY);
outh = yaffs_open(yaffsName, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-
+
while((ni = read(inh,buffer,100)) > 0)
{
no = yaffs_write(outh,buffer,ni);
@@ -44,9 +44,9 @@ void copy_in_a_file(const char *yaffsName,const char *inName)
{
printf("problem writing yaffs file\n");
}
-
+
}
-
+
yaffs_close(outh);
close(inh);
}
@@ -58,19 +58,19 @@ void make_a_file(const char *yaffsName,char bval,int sizeOfFile)
unsigned char buffer[100];
outh = yaffs_open(yaffsName, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-
+
memset(buffer,bval,100);
-
+
do{
i = sizeOfFile;
if(i > 100) i = 100;
sizeOfFile -= i;
-
+
yaffs_write(outh,buffer,i);
-
+
} while (sizeOfFile > 0);
-
-
+
+
yaffs_close(outh);
}
@@ -83,7 +83,7 @@ void make_pattern_file(char *fn,int size)
outh = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
yaffs_lseek(outh,size-1,SEEK_SET);
yaffs_write(outh,"A",1);
-
+
for(i = 0; i < size; i+=256)
{
marker = ~i;
@@ -91,7 +91,7 @@ void make_pattern_file(char *fn,int size)
yaffs_write(outh,&marker,sizeof(marker));
}
yaffs_close(outh);
-
+
}
int check_pattern_file(char *fn)
@@ -101,10 +101,10 @@ int check_pattern_file(char *fn)
int i;
int size;
int ok = 1;
-
+
h = yaffs_open(fn, O_RDWR,0);
size = yaffs_lseek(h,0,SEEK_END);
-
+
for(i = 0; i < size; i+=256)
{
yaffs_lseek(h,i,SEEK_SET);
@@ -130,16 +130,16 @@ int dump_file_data(char *fn)
int i = 0;
int ok = 1;
unsigned char b;
-
+
h = yaffs_open(fn, O_RDWR,0);
-
+
printf("%s\n",fn);
while(yaffs_read(h,&b,1)> 0)
{
printf("%02x",b);
i++;
- if(i > 32)
+ if(i > 32)
{
printf("\n");
i = 0;;
@@ -157,7 +157,7 @@ void dump_file(const char *fn)
int i;
int size;
int h;
-
+
h = yaffs_open(fn,O_RDONLY,0);
if(h < 0)
{
@@ -169,7 +169,7 @@ void dump_file(const char *fn)
printf("*****\nDump file %s size %d\n",fn,size);
for(i = 0; i < size; i++)
{
-
+
}
}
}
@@ -183,7 +183,7 @@ void create_file_of_size(const char *fn,int syze)
char xx[200];
h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-
+
while (syze > 0)
{
sprintf(xx,"%s %8d",fn,iteration);
@@ -203,23 +203,23 @@ void verify_file_of_size(const char *fn,int syze)
{
int h;
int result;
-
+
char xx[200];
char yy[200];
int l;
-
+
int iterations = (syze + strlen(fn) -1)/ strlen(fn);
-
+
h = yaffs_open(fn, O_RDONLY, S_IREAD | S_IWRITE);
-
+
while (iterations > 0)
{
sprintf(xx,"%s %8d",fn,iterations);
l = strlen(xx);
-
+
result = yaffs_read(h,yy,l);
yy[l] = 0;
-
+
if(strcmp(xx,yy)){
printf("=====>>>>> verification of file %s failed near position %lld\n",fn,(long long)yaffs_lseek(h,0,SEEK_CUR));
}
@@ -231,20 +231,20 @@ void verify_file_of_size(const char *fn,int syze)
void create_resized_file_of_size(const char *fn,int syze1,int reSyze, int syze2)
{
int h;
-
+
int iterations;
-
+
h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-
+
iterations = (syze1 + strlen(fn) -1)/ strlen(fn);
while (iterations > 0)
{
yaffs_write(h,fn,strlen(fn));
iterations--;
}
-
+
yaffs_ftruncate(h,reSyze);
-
+
yaffs_lseek(h,0,SEEK_SET);
iterations = (syze2 + strlen(fn) -1)/ strlen(fn);
while (iterations > 0)
@@ -252,7 +252,7 @@ void create_resized_file_of_size(const char *fn,int syze1,int reSyze, int syze2)
yaffs_write(h,fn,strlen(fn));
iterations--;
}
-
+
yaffs_close (h);
}
@@ -270,28 +270,28 @@ void do_some_file_stuff(const char *path)
yaffs_unlink(fn);
sprintf(fn,"%s/%s",path,"f2");
-
+
create_resized_file_of_size(fn,10000,3000,4000);
}
void yaffs_backward_scan_test(const char *path)
{
char fn[100];
-
- yaffs_start_up();
-
+
+ yaffs_start_up();
+
yaffs_mount(path);
-
+
do_some_file_stuff(path);
-
+
sprintf(fn,"%s/ddd",path);
-
+
yaffs_mkdir(fn,0);
-
+
do_some_file_stuff(fn);
-
+
yaffs_unmount(path);
-
+
yaffs_mount(path);
}
@@ -319,16 +319,16 @@ void yaffs_device_flush_test(const char *path)
char fn[100];
int h;
int i;
-
- yaffs_start_up();
-
+
+ yaffs_start_up();
+
yaffs_mount(path);
-
+
do_some_file_stuff(path);
-
+
// Open and add some data to a few files
for(i = 0; i < 10; i++) {
-
+
sprintf(fn,"%s/ff%d",path,i);
h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IWRITE | S_IREAD);
@@ -336,7 +336,7 @@ void yaffs_device_flush_test(const char *path)
yaffs_write(h,xxzz,2000);
}
yaffs_unmount(path);
-
+
yaffs_mount(path);
}
@@ -346,9 +346,9 @@ void short_scan_test(const char *path, int fsize, int niterations)
{
int i;
char fn[100];
-
+
sprintf(fn,"%s/%s",path,"f1");
-
+
yaffs_start_up();
for(i = 0; i < niterations; i++)
{
@@ -369,13 +369,13 @@ void scan_pattern_test(const char *path, int fsize, int niterations)
int j;
char fn[3][100];
int result;
-
+
sprintf(fn[0],"%s/%s",path,"f0");
sprintf(fn[1],"%s/%s",path,"f1");
sprintf(fn[2],"%s/%s",path,"f2");
-
+
yaffs_start_up();
-
+
for(i = 0; i < niterations; i++)
{
printf("\n*****************\nIteration %d\n",i);
@@ -386,7 +386,7 @@ void scan_pattern_test(const char *path, int fsize, int niterations)
{
result = dump_file_data(fn[j]);
result = check_pattern_file(fn[j]);
- make_pattern_file(fn[j],fsize);
+ make_pattern_file(fn[j],fsize);
result = dump_file_data(fn[j]);
result = check_pattern_file(fn[j]);
}
@@ -401,17 +401,17 @@ void fill_disk(const char *path,int nfiles)
int result;
int f;
- static char xx[600];
+ static char xx[600];
char str[50];
-
+
for(n = 0; n < nfiles; n++)
{
sprintf(str,"%s/%d",path,n);
-
+
h = yaffs_open(str, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-
+
printf("writing file %s handle %d ",str, h);
-
+
while ((result = yaffs_write(h,xx,600)) == 600)
{
f = yaffs_freespace(path);
@@ -426,12 +426,12 @@ void fill_disk_and_delete(const char *path, int nfiles, int ncycles)
int i,j;
char str[50];
int result;
-
+
for(i = 0; i < ncycles; i++)
{
printf("@@@@@@@@@@@@@@ cycle %d\n",i);
fill_disk(path,nfiles);
-
+
for(j = 0; j < nfiles; j++)
{
sprintf(str,"%s/%d",path,j);
@@ -448,9 +448,9 @@ void fill_files(const char *path,int flags, int maxIterations,int siz)
int j;
char str[50];
int h;
-
+
i = 0;
-
+
do{
sprintf(str,"%s/%d",path,i);
h = yaffs_open(str, O_CREAT | O_TRUNC | O_RDWR,S_IREAD | S_IWRITE);
@@ -462,14 +462,14 @@ void fill_files(const char *path,int flags, int maxIterations,int siz)
yaffs_write(h,str,1);
}
}
-
+
if( flags & 1)
{
yaffs_unlink(str);
}
i++;
} while(h >= 0 && i < maxIterations);
-
+
if(flags & 2)
{
i = 0;
@@ -486,9 +486,9 @@ void leave_unlinked_file(const char *path,int maxIterations,int siz)
int i;
char str[50];
int h;
-
+
i = 0;
-
+
do{
sprintf(str,"%s/%d",path,i);
printf("create %s\n",str);
@@ -499,7 +499,7 @@ void leave_unlinked_file(const char *path,int maxIterations,int siz)
}
i++;
} while(h < 0 && i < maxIterations);
-
+
if(h >= 0)
{
for(i = 0; i < siz; i++)
@@ -507,7 +507,7 @@ void leave_unlinked_file(const char *path,int maxIterations,int siz)
yaffs_write(h,str,1);
}
}
-
+
printf("Leaving file %s open\n",str);
}
@@ -518,9 +518,9 @@ void dumpDirFollow(const char *dname)
yaffs_dirent *de;
struct yaffs_stat s;
char str[100];
-
+
d = yaffs_opendir(dname);
-
+
if(!d)
{
printf("opendir failed\n");
@@ -530,9 +530,9 @@ void dumpDirFollow(const char *dname)
while((de = yaffs_readdir(d)) != NULL)
{
sprintf(str,"%s/%s",dname,de->d_name);
-
+
yaffs_lstat(str,&s);
-
+
printf("%s ino %d length %d mode %X ",de->d_name,(int)s.st_ino,(int)s.st_size,s.st_mode);
switch(s.st_mode & S_IFMT)
{
@@ -542,18 +542,18 @@ void dumpDirFollow(const char *dname)
if(yaffs_readlink(str,str,100) < 0)
printf("no alias");
else
- printf("\"%s\"",str);
+ printf("\"%s\"",str);
break;
default: printf("unknown"); break;
}
-
- printf("\n");
+
+ printf("\n");
}
-
+
yaffs_closedir(d);
}
printf("\n");
-
+
printf("Free space in %s is %d\n\n",dname,(int)yaffs_freespace(dname));
}
@@ -565,9 +565,9 @@ void dump_directory_tree_worker(const char *dname,int recursive)
yaffs_dirent *de;
struct yaffs_stat s;
char str[1000];
-
+
d = yaffs_opendir(dname);
-
+
if(!d)
{
printf("opendir failed\n");
@@ -577,9 +577,9 @@ void dump_directory_tree_worker(const char *dname,int recursive)
while((de = yaffs_readdir(d)) != NULL)
{
sprintf(str,"%s/%s",dname,de->d_name);
-
+
yaffs_lstat(str,&s);
-
+
printf("%s inode %d obj %x length %d mode %X ",str,s.st_ino,de->d_dont_use,(int)s.st_size,s.st_mode);
switch(s.st_mode & S_IFMT)
{
@@ -589,18 +589,18 @@ void dump_directory_tree_worker(const char *dname,int recursive)
if(yaffs_readlink(str,str,100) < 0)
printf("no alias");
else
- printf("\"%s\"",str);
+ printf("\"%s\"",str);
break;
default: printf("unknown"); break;
}
-
+
printf("\n");
if((s.st_mode & S_IFMT) == S_IFDIR && recursive)
dump_directory_tree_worker(str,1);
-
+
}
-
+
yaffs_closedir(d);
}
@@ -623,11 +623,11 @@ void dumpDir(const char *dname)
static void PermissionsCheck(const char *path, mode_t tmode, int tflags,int expectedResult)
{
int fd;
-
+
if(yaffs_chmod(path,tmode)< 0) printf("chmod failed\n");
-
+
fd = yaffs_open(path,tflags,0);
-
+
if((fd >= 0) != (expectedResult > 0))
{
printf("Permissions check %x %x %d failed\n",tmode,tflags,expectedResult);
@@ -636,11 +636,11 @@ static void PermissionsCheck(const char *path, mode_t tmode, int tflags,int expe
{
printf("Permissions check %x %x %d OK\n",tmode,tflags,expectedResult);
}
-
-
+
+
yaffs_close(fd);
-
-
+
+
}
int long_test(int argc, char *argv[])
@@ -649,20 +649,20 @@ int long_test(int argc, char *argv[])
int f;
int r;
char buffer[20];
-
+
char str[100];
-
+
int h;
mode_t temp_mode;
struct yaffs_stat ystat;
-
+
yaffs_start_up();
-
+
yaffs_mount("/boot");
yaffs_mount("/data");
yaffs_mount("/flash");
yaffs_mount("/ram");
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
printf("\nDirectory look-up of /data\n");
@@ -672,36 +672,36 @@ int long_test(int argc, char *argv[])
//leave_unlinked_file("/flash",20000,0);
//leave_unlinked_file("/data",20000,0);
-
+
leave_unlinked_file("/ram",20,0);
-
+
f = yaffs_open("/boot/b1", O_RDONLY,0);
-
+
printf("open /boot/b1 readonly, f=%d\n",f);
-
+
f = yaffs_open("/boot/b1", O_CREAT,S_IREAD | S_IWRITE);
-
+
printf("open /boot/b1 O_CREAT, f=%d\n",f);
-
-
+
+
r = yaffs_write(f,"hello",1);
printf("write %d attempted to write to a read-only file\n",r);
-
+
r = yaffs_close(f);
-
+
printf("close %d\n",r);
f = yaffs_open("/boot/b1", O_RDWR,0);
-
+
printf("open /boot/b1 O_RDWR,f=%d\n",f);
-
-
+
+
r = yaffs_write(f,"hello",2);
printf("write %d attempted to write to a writeable file\n",r);
r = yaffs_write(f,"world",3);
printf("write %d attempted to write to a writeable file\n",r);
-
+
r= yaffs_lseek(f,0,SEEK_END);
printf("seek end %d\n",r);
memset(buffer,0,20);
@@ -718,75 +718,75 @@ int long_test(int argc, char *argv[])
// Check values reading at end.
// A read past end of file should return 0 for 0 bytes read.
-
+
r= yaffs_lseek(f,0,SEEK_END);
r = yaffs_read(f,buffer,10);
- printf("read at end returned %d\n",r);
+ printf("read at end returned %d\n",r);
r= yaffs_lseek(f,500,SEEK_END);
r = yaffs_read(f,buffer,10);
- printf("read past end returned %d\n",r);
-
+ printf("read past end returned %d\n",r);
+
r = yaffs_close(f);
-
+
printf("close %d\n",r);
-
+
copy_in_a_file("/boot/yyfile","xxx");
-
+
// Create a file with a long name
-
+
copy_in_a_file("/boot/file with a long name","xxx");
-
-
+
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
// Check stat
r = yaffs_lstat("/boot/file with a long name",&ystat);
-
+
// Check rename
-
+
r = yaffs_rename("/boot/file with a long name","/boot/r1");
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
-
+
// Check unlink
r = yaffs_unlink("/boot/r1");
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
// Check mkdir
-
+
r = yaffs_mkdir("/boot/directory1",0);
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
printf("\nDirectory look-up of /boot/directory1\n");
dumpDir("/boot/directory1");
- // add a file to the directory
+ // add a file to the directory
copy_in_a_file("/boot/directory1/file with a long name","xxx");
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
printf("\nDirectory look-up of /boot/directory1\n");
dumpDir("/boot/directory1");
-
+
// Attempt to delete directory (should fail)
-
+
r = yaffs_rmdir("/boot/directory1");
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
printf("\nDirectory look-up of /boot/directory1\n");
dumpDir("/boot/directory1");
-
+
// Delete file first, then rmdir should work
r = yaffs_unlink("/boot/directory1/file with a long name");
r = yaffs_rmdir("/boot/directory1");
-
-
+
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
printf("\nDirectory look-up of /boot/directory1\n");
@@ -794,19 +794,19 @@ int long_test(int argc, char *argv[])
#if 0
fill_disk_and_delete("/boot",20,20);
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
#endif
yaffs_symlink("yyfile","/boot/slink");
-
+
yaffs_readlink("/boot/slink",str,100);
printf("symlink alias is %s\n",str);
-
-
-
-
+
+
+
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
printf("\nDirectory look-up of /boot (using stat instead of lstat)\n");
@@ -815,30 +815,30 @@ int long_test(int argc, char *argv[])
dumpDir("/boot/directory1");
h = yaffs_open("/boot/slink",O_RDWR,0);
-
+
printf("file length is %d\n",(int)yaffs_lseek(h,0,SEEK_END));
-
+
yaffs_close(h);
-
+
yaffs_unlink("/boot/slink");
-
+
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
-
+
// Check chmod
-
+
yaffs_lstat("/boot/yyfile",&ystat);
temp_mode = ystat.st_mode;
-
+
yaffs_chmod("/boot/yyfile",0x55555);
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
-
+
yaffs_chmod("/boot/yyfile",temp_mode);
printf("\nDirectory look-up of /boot\n");
dumpDir("/boot");
-
+
// Permission checks...
PermissionsCheck("/boot/yyfile",0, O_WRONLY,0);
PermissionsCheck("/boot/yyfile",0, O_RDONLY,0);
@@ -851,44 +851,44 @@ int long_test(int argc, char *argv[])
PermissionsCheck("/boot/yyfile",S_IWRITE, O_WRONLY,1);
PermissionsCheck("/boot/yyfile",S_IWRITE, O_RDONLY,0);
PermissionsCheck("/boot/yyfile",S_IWRITE, O_RDWR,0);
-
+
PermissionsCheck("/boot/yyfile",S_IREAD | S_IWRITE, O_WRONLY,1);
PermissionsCheck("/boot/yyfile",S_IREAD | S_IWRITE, O_RDONLY,1);
PermissionsCheck("/boot/yyfile",S_IREAD | S_IWRITE, O_RDWR,1);
yaffs_chmod("/boot/yyfile",temp_mode);
-
+
//create a zero-length file and unlink it (test for scan bug)
-
+
h = yaffs_open("/boot/zlf",O_CREAT | O_TRUNC | O_RDWR,0);
yaffs_close(h);
-
+
yaffs_unlink("/boot/zlf");
-
-
+
+
yaffs_dump_dev("/boot");
-
+
fill_disk_and_delete("/boot",20,20);
-
+
yaffs_dump_dev("/boot");
-
+
fill_files("/boot",1,10000,0);
fill_files("/boot",1,10000,5000);
fill_files("/boot",2,10000,0);
fill_files("/boot",2,10000,5000);
-
+
leave_unlinked_file("/data",20000,0);
leave_unlinked_file("/data",20000,5000);
leave_unlinked_file("/data",20000,5000);
leave_unlinked_file("/data",20000,5000);
leave_unlinked_file("/data",20000,5000);
leave_unlinked_file("/data",20000,5000);
-
+
yaffs_dump_dev("/boot");
yaffs_dump_dev("/data");
-
-
-
+
+
+
return 0;
}
@@ -905,26 +905,26 @@ int huge_directory_test_on_path(char *path)
int total = 0;
int lastTotal = 0;
-
+
char str[100];
-
+
yaffs_start_up();
-
+
yaffs_mount(path);
-
+
// Create a large number of files
-
+
for(i = 0; i < 2000; i++)
{
sprintf(str,"%s/%d",path,i);
-
+
f = yaffs_open(str,O_CREAT,S_IREAD | S_IWRITE);
yaffs_close(f);
}
-
-
-
+
+
+
d = yaffs_opendir(path);
i = 0;
if (d) {
@@ -943,10 +943,10 @@ int huge_directory_test_on_path(char *path)
break;
}
}
-
+
yaffs_closedir(d);
}
-
+
return 0;
}
@@ -962,34 +962,34 @@ void rename_over_test(const char *mountpt)
char a[100];
char b[100];
char c[100];
-
+
sprintf(a,"%s/a",mountpt);
sprintf(b,"%s/b",mountpt);
sprintf(c,"%s/c",mountpt);
-
+
yaffs_start_up();
-
+
yaffs_mount(mountpt);
-
+
printf("Existing files\n");
dumpDirFollow(mountpt);
-
-
-
+
+
+
i = yaffs_open(c,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
printf("File c handle is %d\n",i);
yaffs_close(i);
- i = yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
+ i = yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
yaffs_close(i);
i = yaffs_open(b,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
yaffs_close(i);
yaffs_rename(a,b); // rename over
yaffs_rename(b,a); // rename back again (not renaimng over)
yaffs_rename(a,b); // rename back again (not renaimng over)
-
-
+
+
yaffs_unmount(mountpt);
-
+
}
@@ -1000,46 +1000,46 @@ int resize_stress_test(const char *path)
int r;
char aname[100];
char bname[100];
-
+
char abuffer[1000];
char bbuffer[1000];
-
+
yaffs_start_up();
-
+
yaffs_mount(path);
-
+
sprintf(aname,"%s%s",path,"/a");
sprintf(bname,"%s%s",path,"/b");
-
+
memset(abuffer,'a',1000);
memset(bbuffer,'b',1000);
-
+
a = yaffs_open(aname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
printf(" %s %d %s %d\n",aname,a,bname,b);
-
+
x = 0;
-
+
for(j = 0; j < 100; j++)
{
yaffs_lseek(a,0,SEEK_END);
-
+
for(i = 0; i <20000; i++)
{
//r = yaffs_lseek(b,i,SEEK_SET);
//r = yaffs_write(b,bbuffer,1000);
-
+
if(x & 0x16)
{
// shrink
int syz = yaffs_lseek(a,0,SEEK_END);
-
+
syz -= 500;
if(syz < 0) syz = 0;
yaffs_ftruncate(a,syz);
-
+
}
else
{
@@ -1048,12 +1048,12 @@ int resize_stress_test(const char *path)
r = yaffs_write(a,abuffer,1000);
}
x++;
-
+
}
}
-
+
return 0;
-
+
}
@@ -1062,16 +1062,16 @@ int overwrite_test(const char *path)
char aname[100];
char bname[100];
int i;
- int j;
+ int j;
int a;
int b;
yaffs_start_up();
-
+
yaffs_mount(path);
-
+
sprintf(aname,"%s%s",path,"/a");
sprintf(bname,"%s%s",path,"/b");
-
+
b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
for(j= 0; j < 500; j++){
yaffs_write(b,bname,100);
@@ -1080,32 +1080,32 @@ int overwrite_test(const char *path)
yaffs_write(a,&a,sizeof(a));
yaffs_close(a);
}
-
+
return 0;
-
+
}
int root_perm_remount(const char *path)
{
struct yaffs_stat s;
-
+
yaffs_start_up();
-
+
yaffs_mount(path);
-
+
yaffs_lstat(path,&s);
printf("root perms after mount %x\n",s.st_mode);
-
+
yaffs_chmod(path, 0777);
yaffs_lstat(path,&s);
printf("root perms after setting to 0777 is %x\n",s.st_mode);
-
+
yaffs_unmount(path);
-
+
return 0;
-
+
}
@@ -1116,54 +1116,54 @@ int resize_stress_test_no_grow_complex(const char *path,int iters)
int r;
char aname[100];
char bname[100];
-
+
char abuffer[1000];
char bbuffer[1000];
-
+
yaffs_start_up();
-
+
yaffs_mount(path);
-
+
sprintf(aname,"%s%s",path,"/a");
sprintf(bname,"%s%s",path,"/b");
-
+
memset(abuffer,'a',1000);
memset(bbuffer,'b',1000);
-
+
a = yaffs_open(aname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
printf(" %s %d %s %d\n",aname,a,bname,b);
-
+
x = 0;
-
+
for(j = 0; j < iters; j++)
{
yaffs_lseek(a,0,SEEK_END);
-
+
for(i = 0; i <20000; i++)
{
//r = yaffs_lseek(b,i,SEEK_SET);
//r = yaffs_write(b,bbuffer,1000);
-
+
if(!(x%20))
{
// shrink
int syz = yaffs_lseek(a,0,SEEK_END);
-
+
while(syz > 4000)
{
-
+
syz -= 2050;
if(syz < 0) syz = 0;
yaffs_ftruncate(a,syz);
syz = yaffs_lseek(a,0,SEEK_END);
printf("shrink to %d\n",syz);
}
-
-
+
+
}
else
{
@@ -1172,16 +1172,16 @@ int resize_stress_test_no_grow_complex(const char *path,int iters)
r = yaffs_write(a,abuffer,1000);
}
x++;
-
-
+
+
}
-
+
printf("file size is %lld\n",(long long)yaffs_lseek(a,0,SEEK_END));
}
-
+
return 0;
-
+
}
int resize_stress_test_no_grow(const char *path,int iters)
@@ -1191,53 +1191,53 @@ int resize_stress_test_no_grow(const char *path,int iters)
int r;
char aname[100];
char bname[100];
-
+
char abuffer[1000];
char bbuffer[1000];
-
+
yaffs_start_up();
-
+
yaffs_mount(path);
-
+
sprintf(aname,"%s%s",path,"/a");
sprintf(bname,"%s%s",path,"/b");
-
+
memset(abuffer,'a',1000);
memset(bbuffer,'b',1000);
-
+
a = yaffs_open(aname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
printf(" %s %d %s %d\n",aname,a,bname,b);
-
+
x = 0;
-
+
for(j = 0; j < iters; j++)
{
yaffs_lseek(a,0,SEEK_END);
-
+
for(i = 0; i <20000; i++)
{
//r = yaffs_lseek(b,i,SEEK_SET);
//r = yaffs_write(b,bbuffer,1000);
-
+
if(!(x%20))
{
// shrink
int syz = yaffs_lseek(a,0,SEEK_END);
-
+
while(syz > 4000)
{
-
+
syz -= 2050;
if(syz < 0) syz = 0;
yaffs_ftruncate(a,syz);
syz = yaffs_lseek(a,0,SEEK_END);
printf("shrink to %d\n",syz);
}
-
-
+
+
}
else
{
@@ -1246,34 +1246,34 @@ int resize_stress_test_no_grow(const char *path,int iters)
r = yaffs_write(a,abuffer,1000);
}
x++;
-
-
+
+
}
printf("file size is %lld\n",(long long)yaffs_lseek(a,0,SEEK_END));
}
-
+
return 0;
-
+
}
int directory_rename_test(void)
{
int r;
yaffs_start_up();
-
+
yaffs_mount("/ram");
yaffs_mkdir("/ram/a",0);
yaffs_mkdir("/ram/a/b",0);
yaffs_mkdir("/ram/c",0);
-
+
printf("\nDirectory look-up of /ram\n");
dumpDir("/ram");
dumpDir("/ram/a");
dumpDir("/ram/a/b");
printf("Do rename (should fail)\n");
-
+
r = yaffs_rename("/ram/a","/ram/a/b/d");
printf("\nDirectory look-up of /ram\n");
dumpDir("/ram");
@@ -1281,16 +1281,16 @@ int directory_rename_test(void)
dumpDir("/ram/a/b");
printf("Do rename (should not fail)\n");
-
+
r = yaffs_rename("/ram/c","/ram/a/b/d");
printf("\nDirectory look-up of /ram\n");
dumpDir("/ram");
dumpDir("/ram/a");
dumpDir("/ram/a/b");
-
-
+
+
return 1;
-
+
}
int cache_read_test(void)
@@ -1299,11 +1299,11 @@ int cache_read_test(void)
int i;
int sizeOfFiles = 500000;
char buffer[100];
-
+
yaffs_start_up();
-
+
yaffs_mount("/boot");
-
+
make_a_file("/boot/a",'a',sizeOfFiles);
make_a_file("/boot/b",'b',sizeOfFiles);
@@ -1319,11 +1319,11 @@ int cache_read_test(void)
yaffs_read(b,buffer,i);
yaffs_write(c,buffer,i);
} while(sizeOfFiles > 0);
-
-
-
+
+
+
return 1;
-
+
}
int cache_bypass_bug_test(void)
@@ -1331,46 +1331,46 @@ int cache_bypass_bug_test(void)
// This test reporoduces a bug whereby YAFFS caching *was* buypassed
// resulting in erroneous reads after writes.
// This bug has been fixed.
-
+
int a;
char buffer1[1000];
char buffer2[1000];
-
+
memset(buffer1,0,sizeof(buffer1));
memset(buffer2,0,sizeof(buffer2));
-
+
yaffs_start_up();
-
+
yaffs_mount("/boot");
-
+
// Create a file of 2000 bytes.
make_a_file("/boot/a",'X',2000);
a = yaffs_open("/boot/a",O_RDWR, S_IREAD | S_IWRITE);
-
+
// Write a short sequence to the file.
// This will go into the cache.
yaffs_lseek(a,0,SEEK_SET);
- yaffs_write(a,"abcdefghijklmnopqrstuvwxyz",20);
+ yaffs_write(a,"abcdefghijklmnopqrstuvwxyz",20);
// Read a short sequence from the file.
// This will come from the cache.
yaffs_lseek(a,0,SEEK_SET);
- yaffs_read(a,buffer1,30);
+ yaffs_read(a,buffer1,30);
// Read a page size sequence from the file.
yaffs_lseek(a,0,SEEK_SET);
- yaffs_read(a,buffer2,512);
-
+ yaffs_read(a,buffer2,512);
+
printf("buffer 1 %s\n",buffer1);
printf("buffer 2 %s\n",buffer2);
-
+
if(strncmp(buffer1,buffer2,20))
{
printf("Cache bypass bug detected!!!!!\n");
}
-
-
+
+
return 1;
}
@@ -1378,13 +1378,13 @@ int cache_bypass_bug_test(void)
int free_space_check(void)
{
int f;
-
+
yaffs_start_up();
yaffs_mount("/boot");
fill_disk("/boot/",2);
f = yaffs_freespace("/boot");
-
- printf("%d free when disk full\n",f);
+
+ printf("%d free when disk full\n",f);
return 1;
}
@@ -1401,21 +1401,21 @@ int truncate_test(void)
yaffs_mount("/boot");
yaffs_unlink("/boot/trunctest");
-
+
a = yaffs_open("/boot/trunctest", O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
yaffs_write(a,"abcdefghijklmnopqrstuvwzyz",26);
-
+
yaffs_ftruncate(a,3);
l= yaffs_lseek(a,0,SEEK_END);
-
+
printf("truncated length is %d\n",l);
yaffs_lseek(a,5,SEEK_SET);
yaffs_write(a,"1",1);
yaffs_lseek(a,0,SEEK_SET);
-
+
r = yaffs_read(a,y,10);
printf("read %d bytes:",r);
@@ -1436,14 +1436,14 @@ void fill_disk_test(const char *mountpt)
{
int i;
yaffs_start_up();
-
+
for(i = 0; i < 5; i++)
{
yaffs_mount(mountpt);
fill_disk_and_delete(mountpt,100,i+1);
yaffs_unmount(mountpt);
}
-
+
}
@@ -1451,14 +1451,14 @@ void fill_files_test(const char *mountpt)
{
int i;
yaffs_start_up();
-
+
for(i = 0; i < 5; i++)
{
yaffs_mount(mountpt);
fill_files(mountpt,2,3,100);
yaffs_unmount(mountpt);
}
-
+
}
void fill_empty_files_test(const char *mountpt)
@@ -1467,7 +1467,7 @@ void fill_empty_files_test(const char *mountpt)
yaffs_start_up();
char name[100];
int result = 0;
-
+
int d,f;
for(i = 0; i < 5; i++)
@@ -1477,7 +1477,7 @@ void fill_empty_files_test(const char *mountpt)
sprintf(name,"%s/%d",mountpt,d);
result= yaffs_mkdir(name,0);
printf("creating directory %s result %d\n",name,result);
-
+
for(f = 0; result >= 0 && f < 100; f++){
sprintf(name,"%s/%d/%d",mountpt,d,f);
result= yaffs_open(name,O_CREAT, 0);
@@ -1487,7 +1487,7 @@ void fill_empty_files_test(const char *mountpt)
}
yaffs_unmount(mountpt);
}
-
+
}
void long_name_test(const char *mountpt)
@@ -1497,44 +1497,44 @@ void long_name_test(const char *mountpt)
char fullName[1000];
char name[300];
int result = 0;
-
+
int f;
-
+
// Make a 256 byte name
memset(name,0,sizeof(name));
for(i = 0; i < 256; i++)
name[i] = '0' + i % 10;
-
+
sprintf(fullName,"%s/%s",mountpt,name);
for(i = 0; i < 1; i++)
{
yaffs_mount(mountpt);
-
+
printf("Files at start\n");
dumpDir(mountpt);
-
+
printf("Creating file %s\n",fullName);
-
+
f = yaffs_open(fullName,O_CREAT | O_RDWR,0);
yaffs_close(f);
-
+
printf("Result %d\n",f);
-
+
printf("Files\n");
dumpDir(mountpt);
-
+
printf("Deleting %s\n",fullName);
result = yaffs_unlink(fullName);
printf("Result %d\n",result);
-
+
printf("Files\n");
-
+
dumpDir(mountpt);
-
+
yaffs_unmount(mountpt);
}
-
+
}
@@ -1543,34 +1543,34 @@ void lookup_test(const char *mountpt)
int i;
int h;
char a[100];
-
+
yaffs_DIR *d;
yaffs_dirent *de;
yaffs_start_up();
-
+
yaffs_mount(mountpt);
-
+
d = yaffs_opendir(mountpt);
-
+
if(!d)
{
printf("opendir failed\n");
}
else
{
-
+
for(i = 0; (de = yaffs_readdir(d)) != NULL; i++)
{
printf("unlinking %s\n",de->d_name);
yaffs_unlink(de->d_name);
}
-
+
printf("%d files deleted\n",i);
}
-
-
+
+
for(i = 0; i < 2000; i++){
sprintf(a,"%s/%d",mountpt,i);
h = yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR, 0);
@@ -1581,23 +1581,23 @@ void lookup_test(const char *mountpt)
for(i = 0; (de = yaffs_readdir(d)) != NULL; i++)
{
printf("%d %s\n",i,de->d_name);
- }
-
+ }
+
printf("%d files listed\n\n\n",i);
-
+
yaffs_rewinddir(d);
yaffs_readdir(d);
yaffs_readdir(d);
yaffs_readdir(d);
-
+
for(i = 0; i < 2000; i++){
sprintf(a,"%s/%d",mountpt,i);
yaffs_unlink(a);
}
-
-
+
+
yaffs_unmount(mountpt);
-
+
}
void link_test0(const char *mountpt)
@@ -1605,12 +1605,12 @@ void link_test0(const char *mountpt)
char namea[300];
char nameb[300];
int result = 0;
-
+
yaffs_start_up();
yaffs_mount(mountpt);
-
-
+
+
sprintf(namea,"%s/a",mountpt);
sprintf(nameb,"%s/b",mountpt);
@@ -1624,7 +1624,7 @@ void link_test0(const char *mountpt)
yaffs_unlink(nameb);
printf("b unlinked\n");
dumpDir(mountpt);
-
+
result = yaffs_open(namea,O_CREAT| O_RDWR,0666);
yaffs_close(result);
printf("a created\n");
@@ -1655,18 +1655,18 @@ void link_test1(const char *mountpt)
sprintf(a,"%s/aaa",mountpt);
sprintf(b,"%s/bbb",mountpt);
sprintf(c,"%s/ccc",mountpt);
-
+
yaffs_start_up();
-
+
yaffs_mount(mountpt);
-
-
+
+
h = yaffs_open(a, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
for(i = 0; i < 100; i++)
yaffs_write(h,a,100);
-
+
yaffs_close(h);
-
+
yaffs_unlink(b);
yaffs_unlink(c);
yaffs_link(a,b);
@@ -1674,12 +1674,12 @@ void link_test1(const char *mountpt)
yaffs_unlink(b);
yaffs_unlink(c);
yaffs_unlink(a);
-
-
+
+
yaffs_unmount(mountpt);
yaffs_mount(mountpt);
-
- printf("link test done\n");
+
+ printf("link test done\n");
}
void handle_test(const char *mountpt)
@@ -1690,9 +1690,9 @@ void handle_test(const char *mountpt)
char a[100];
sprintf(a,"%s/aaa",mountpt);
-
+
yaffs_start_up();
-
+
yaffs_mount(mountpt);
for(cycle = 0; cycle < 5; cycle++){
@@ -1703,13 +1703,13 @@ void handle_test(const char *mountpt)
printf("%d handle %d\n",i,h);
i++;
} while(h >= 0);
-
+
while(i >= -1) {
yaffs_close(i);
i--;
}
}
-
+
yaffs_unmount(mountpt);
}
@@ -1718,41 +1718,41 @@ void freespace_test(const char *mountpt)
int i;
int h;
char a[100];
-
+
int f0;
int f1;
int f2;
int f3;
sprintf(a,"%s/aaa",mountpt);
-
+
yaffs_start_up();
-
+
yaffs_mount(mountpt);
-
+
f0 = yaffs_freespace(mountpt);
-
+
h = yaffs_open(a, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
for(i = 0; i < 100; i++)
yaffs_write(h,a,100);
-
+
yaffs_close(h);
-
+
f1 = yaffs_freespace(mountpt);
-
+
yaffs_unlink(a);
-
+
f2 = yaffs_freespace(mountpt);
-
-
+
+
yaffs_unmount(mountpt);
yaffs_mount(mountpt);
-
+
f3 = yaffs_freespace(mountpt);
-
+
printf("%d\n%d\n%d\n%d\n",f0, f1,f2,f3);
-
-
+
+
}
void simple_rw_test(const char *mountpt)
@@ -1760,49 +1760,49 @@ void simple_rw_test(const char *mountpt)
int i;
int h;
char a[100];
-
+
int x;
int result;
sprintf(a,"%s/aaa",mountpt);
-
+
yaffs_start_up();
-
+
yaffs_mount(mountpt);
-
+
yaffs_unlink(a);
-
+
h = yaffs_open(a,O_CREAT| O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
for(i = 100000;i < 200000; i++){
result = yaffs_write(h,&i,sizeof(i));
-
+
if(result != 4)
{
printf("write error\n");
exit(1);
}
}
-
+
//yaffs_close(h);
-
+
// h = yaffs_open(a,O_RDWR, S_IREAD | S_IWRITE);
-
-
+
+
yaffs_lseek(h,0,SEEK_SET);
-
+
for(i = 100000; i < 200000; i++){
result = yaffs_read(h,&x,sizeof(x));
-
+
if(result != 4 || x != i){
printf("read error %d %x %x\n",i,result,x);
}
}
-
+
printf("Simple rw test passed\n");
-
-
-
+
+
+
}
@@ -1810,30 +1810,30 @@ void scan_deleted_files_test(const char *mountpt)
{
char fn[100];
char sub[100];
-
+
const char *p;
-
+
int i;
int j;
int k;
int h;
-
+
sprintf(sub,"%s/sdir",mountpt);
yaffs_start_up();
-
+
for(j = 0; j < 10; j++)
{
printf("\n\n>>>>>>> Run %d <<<<<<<<<<<<<\n\n",j);
yaffs_mount(mountpt);
yaffs_mkdir(sub,0);
-
-
+
+
p = (j & 0) ? mountpt: sub;
-
+
for(i = 0; i < 100; i++)
{
- sprintf(fn,"%s/%d",p,i);
-
+ sprintf(fn,"%s/%d",p,i);
+
if(i & 1)
{
h = yaffs_open(fn,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
@@ -1844,22 +1844,22 @@ void scan_deleted_files_test(const char *mountpt)
else
yaffs_mkdir(fn,0);
}
-
+
for(i = 0; i < 10; i++)
{
- sprintf(fn,"%s/%d",p,i);
- if(i & 1)
+ sprintf(fn,"%s/%d",p,i);
+ if(i & 1)
yaffs_unlink(fn);
else
yaffs_rmdir(fn);
-
+
}
-
+
yaffs_unmount(mountpt);
}
-
-
-
+
+
+
}
@@ -1877,35 +1877,35 @@ void write_200k_file(const char *fn, const char *fdel, const char *fdel1)
int h1;
int i;
int offs;
-
+
h1 = yaffs_open(fn, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
for(i = 0; i < 100000; i+= 10000)
{
write_10k(h1);
}
-
+
offs = yaffs_lseek(h1,0,SEEK_CUR);
if( offs != 100000)
{
printf("Could not write file\n");
}
-
+
yaffs_unlink(fdel);
for(i = 0; i < 100000; i+= 10000)
{
write_10k(h1);
}
-
+
offs = yaffs_lseek(h1,0,SEEK_CUR);
if( offs != 200000)
{
printf("Could not write file\n");
}
-
+
yaffs_close(h1);
yaffs_unlink(fdel1);
-
+
}
@@ -1916,9 +1916,9 @@ void verify_200k_file(const char *fn)
char x[11];
const char *s="0123456789";
int errCount = 0;
-
+
h1 = yaffs_open(fn, O_RDONLY, 0);
-
+
for(i = 0; i < 200000 && errCount < 10; i+= 10)
{
yaffs_read(h1,x,10);
@@ -1930,9 +1930,9 @@ void verify_200k_file(const char *fn)
}
if(errCount >= 10)
printf("Too many errors... aborted\n");
-
- yaffs_close(h1);
-
+
+ yaffs_close(h1);
+
}
@@ -1942,23 +1942,23 @@ void check_resize_gc_bug(const char *mountpt)
char a[30];
char b[30];
char c[30];
-
+
int i;
-
+
sprintf(a,"%s/a",mountpt);
sprintf(b,"%s/b",mountpt);
sprintf(c,"%s/c",mountpt);
-
-
-
+
+
+
yaffs_start_up();
yaffs_mount(mountpt);
yaffs_unlink(a);
yaffs_unlink(b);
-
+
for(i = 0; i < 50; i++)
- {
+ {
printf("A\n");write_200k_file(a,"",c);
printf("B\n");verify_200k_file(a);
printf("C\n");write_200k_file(b,a,c);
@@ -1968,7 +1968,7 @@ void check_resize_gc_bug(const char *mountpt)
printf("E\n");verify_200k_file(a);
printf("F\n");verify_200k_file(b);
}
-
+
}
@@ -1976,51 +1976,51 @@ void multi_mount_test(const char *mountpt,int nmounts)
{
char a[30];
-
+
int i;
int j;
-
+
sprintf(a,"%s/a",mountpt);
yaffs_start_up();
-
+
for(i = 0; i < nmounts; i++){
int h0;
int h1;
int len0;
int len1;
-
+
static char xx[1000];
-
+
printf("############### Iteration %d Start\n",i);
- if(1 || i == 0 || i == 5)
+ if(1 || i == 0 || i == 5)
yaffs_mount(mountpt);
dump_directory_tree(mountpt);
-
-
+
+
yaffs_mkdir(a,0);
-
+
sprintf(xx,"%s/0",a);
h0 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-
+
sprintf(xx,"%s/1",a);
h1 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-#if 0
+#if 0
for(j = 0; j < 200; j++){
yaffs_write(h0,xx,1000);
yaffs_write(h1,xx,1000);
}
#else
while(yaffs_write(h0,xx,1000) > 0){
-
+
yaffs_write(h1,xx,1000);
}
#endif
len0 = yaffs_lseek(h0,0,SEEK_END);
len1 = yaffs_lseek(h1,0,SEEK_END);
-
+
yaffs_lseek(h0,0,SEEK_SET);
yaffs_lseek(h1,0,SEEK_SET);
@@ -2028,12 +2028,12 @@ void multi_mount_test(const char *mountpt,int nmounts)
yaffs_read(h0,xx,1000);
yaffs_read(h1,xx,1000);
}
-
-
+
+
// yaffs_truncate(h0,0);
yaffs_close(h0);
yaffs_close(h1);
-
+
printf("########### %d\n",i);
dump_directory_tree(mountpt);
@@ -2047,7 +2047,7 @@ void small_mount_test(const char *mountpt,int nmounts)
{
char a[30];
-
+
int i;
int j;
@@ -2056,46 +2056,46 @@ void small_mount_test(const char *mountpt,int nmounts)
int len0;
int len1;
int nread;
-
+
sprintf(a,"%s/a",mountpt);
yaffs_start_up();
-
-
-
+
+
+
for(i = 0; i < nmounts; i++){
-
+
static char xx[1000];
-
+
printf("############### Iteration %d Start\n",i);
- if(1 || i == 0 || i == 5)
+ if(1 || i == 0 || i == 5)
yaffs_mount(mountpt);
dump_directory_tree(mountpt);
-
+
yaffs_mkdir(a,0);
-
+
sprintf(xx,"%s/0",a);
if(i ==0){
-
+
h0 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
for(j = 0; j < 130; j++)
yaffs_write(h0,xx,1000);
yaffs_close(h0);
}
-
+
h0 = yaffs_open(xx,O_RDONLY,0);
-
+
sprintf(xx,"%s/1",a);
h1 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-
+
while((nread = yaffs_read(h0,xx,1000)) > 0)
yaffs_write(h1,xx,nread);
-
-
+
+
len0 = yaffs_lseek(h0,0,SEEK_END);
len1 = yaffs_lseek(h1,0,SEEK_END);
-
+
yaffs_lseek(h0,0,SEEK_SET);
yaffs_lseek(h1,0,SEEK_SET);
@@ -2103,10 +2103,10 @@ void small_mount_test(const char *mountpt,int nmounts)
yaffs_read(h0,xx,1000);
yaffs_read(h1,xx,1000);
}
-
+
yaffs_close(h0);
yaffs_close(h1);
-
+
printf("########### %d\n",i);
dump_directory_tree(mountpt);
@@ -2128,42 +2128,42 @@ void small_overwrite_test(const char *mountpt,int nmounts)
int h0;
int h1;
-
+
sprintf(a,"%s/a",mountpt);
yaffs_start_up();
-
-
-
+
+
+
for(i = 0; i < nmounts; i++){
-
+
static char xx[8000];
-
+
printf("############### Iteration %d Start\n",i);
if(1)
yaffs_mount(mountpt);
dump_directory_tree(mountpt);
-
+
yaffs_mkdir(a,0);
-
+
sprintf(xx,"%s/0",a);
h0 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
sprintf(xx,"%s/1",a);
h1 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-
+
for(j = 0; j < 1000000; j+=1000){
yaffs_ftruncate(h0,j);
yaffs_lseek(h0,j,SEEK_SET);
yaffs_write(h0,xx,7000);
yaffs_write(h1,xx,7000);
-
+
if(early_exit)
exit(0);
}
-
+
yaffs_close(h0);
-
+
printf("########### %d\n",i);
dump_directory_tree(mountpt);
@@ -2177,36 +2177,36 @@ void seek_overwrite_test(const char *mountpt,int nmounts)
{
static char xx[5000];
char a[30];
-
+
int i;
int j;
int h0;
-
+
sprintf(a,"%s/f",mountpt);
yaffs_start_up();
-
+
yaffs_mount(mountpt);
-
-
+
+
for(i = 0; i < nmounts; i++){
-
+
h0 = yaffs_open(a, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-
+
for(j = 0; j < 100000; j++){
yaffs_lseek(h0,0,SEEK_SET);
yaffs_write(h0,xx,5000);
yaffs_lseek(h0,0x100000,SEEK_SET);
yaffs_write(h0,xx,5000);
-
+
if(early_exit)
exit(0);
}
-
+
yaffs_close(h0);
-
+
}
}
@@ -2222,33 +2222,33 @@ void checkpoint_fill_test(const char *mountpt,int nmounts)
char a[50];
char b[50];
char c[50];
-
+
int i;
int j;
int h;
-
+
sprintf(a,"%s/a",mountpt);
-
-
-
+
+
+
yaffs_start_up();
-
+
for(i = 0; i < nmounts; i++){
printf("############### Iteration %d Start\n",i);
yaffs_mount(mountpt);
dump_directory_tree(mountpt);
yaffs_mkdir(a,0);
-
+
sprintf(b,"%s/zz",a);
-
+
h = yaffs_open(b,O_CREAT | O_RDWR,S_IREAD |S_IWRITE);
-
-
+
+
while(yaffs_write(h,c,50) == 50){}
-
+
yaffs_close(h);
-
+
for(j = 0; j < 2; j++){
printf("touch %d\n",j);
yaffs_touch(b);
@@ -2256,7 +2256,7 @@ void checkpoint_fill_test(const char *mountpt,int nmounts)
yaffs_mount(mountpt);
}
- dump_directory_tree(mountpt);
+ dump_directory_tree(mountpt);
yaffs_unmount(mountpt);
}
}
@@ -2275,7 +2275,7 @@ int make_file2(const char *name1, const char *name2,int syz)
h1 = yaffs_open(name1,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
if(name2)
h2 = yaffs_open(name2,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-
+
while(syz > 0 && n > 0){
i = (syz > 2500) ? 2500 : syz;
n = yaffs_write(h1,xx,i);
@@ -2299,12 +2299,12 @@ void checkpoint_upgrade_test(const char *mountpt,int nmounts)
char d[50];
int j;
-
+
sprintf(a,"%s/a",mountpt);
-
-
-
+
+
+
printf("Create start condition\n");
yaffs_start_up();
yaffs_mount(mountpt);
@@ -2315,20 +2315,20 @@ void checkpoint_upgrade_test(const char *mountpt,int nmounts)
sprintf(d,"%s/aa",a);
make_file2(d,NULL,500000000);
dump_directory_tree(mountpt);
-
+
printf("Umount/mount attempt full\n");
yaffs_unmount(mountpt);
-
+
yaffs_mount(mountpt);
-
+
printf("unlink small file\n");
yaffs_unlink(c);
dump_directory_tree(mountpt);
-
+
printf("Umount/mount attempt\n");
yaffs_unmount(mountpt);
yaffs_mount(mountpt);
-
+
for(j = 0; j < 500; j++){
printf("***** touch %d\n",j);
dump_directory_tree(mountpt);
@@ -2345,26 +2345,26 @@ void checkpoint_upgrade_test(const char *mountpt,int nmounts)
yaffs_mount(mountpt);
}
}
-
+
void huge_array_test(const char *mountpt,int n)
{
char a[50];
-
+
int i;
int space;
-
+
int fnum;
-
+
sprintf(a,"mount point %s",mountpt);
-
-
+
+
yaffs_start_up();
yaffs_mount(mountpt);
-
+
while(n>0){
n--;
fnum = 0;
@@ -2377,9 +2377,9 @@ void huge_array_test(const char *mountpt,int n)
printf("verifying file %s\n",a);
verify_file_of_size(a,10000000);
}
-
+
printf("\n\n verification/deletion\n\n");
-
+
for(i = 0; i < fnum; i++){
sprintf(a,"%s/file%d",mountpt,i);
printf("verifying file %s\n",a);
@@ -2388,8 +2388,8 @@ void huge_array_test(const char *mountpt,int n)
yaffs_unlink(a);
}
printf("\n\n done \n\n");
-
-
+
+
}
}
@@ -2398,7 +2398,7 @@ void random_write(int h)
{
static char buffer[12000];
int n;
-
+
n = random() & 0x1FFF;
yaffs_write(h,buffer,n);
}
@@ -2423,38 +2423,38 @@ void random_truncate(int h, char * name)
}
-#define NSMALLFILES 10
+#define NSMALLFILES 10
void random_small_file_test(const char *mountpt,int iterations)
{
char a[NSMALLFILES][50];
-
+
int i;
int n;
int h[NSMALLFILES];
int r;
-
-
+
+
yaffs_start_up();
yaffs_mount(mountpt);
-
+
for(i = 0; i < NSMALLFILES; i++){
h[i]=-1;
strcpy(a[i],"");
}
-
+
for(n = 0; n < iterations; n++){
-
+
for(i = 0; i < NSMALLFILES; i++) {
r = random();
-
+
if(strlen(a[i]) == 0){
sprintf(a[i],"%s/%dx%d",mountpt,n,i);
h[i] = yaffs_open(a[i],O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
}
-
+
if(h[i] < -1)
printf("Could not open yaffs file %d %d error %d\n",n,i,h[i]);
else {
@@ -2483,12 +2483,12 @@ void random_small_file_test(const char *mountpt,int iterations)
}
}
}
-
+
}
-
+
for(i = 0; i < NSMALLFILES; i++)
yaffs_close(h[i]);
-
+
yaffs_unmount(mountpt);
}
@@ -2496,9 +2496,9 @@ void rmdir_test(const char *mountpt)
{
char name[100];
yaffs_start_up();
-
+
yaffs_mount(mountpt);
-
+
strcpy(name,mountpt);
strcat(name,"/");
strcat(name,"hello");
@@ -2549,6 +2549,50 @@ static void list_xattr(const char *path)
printf("end\n");
}
+void basic_utime_test(const char *mountpt)
+{
+ char name[100];
+ int h;
+ int result;
+ int val1;
+ struct yaffs_utimbuf utb;
+ struct yaffs_stat st;
+
+ yaffs_start_up();
+
+ yaffs_mount(mountpt);
+
+ strcpy(name,mountpt);
+ strcat(name,"/");
+ strcat(name,"xfile");
+
+ yaffs_unlink(name);
+
+ printf("created\n");
+ h = yaffs_open(name,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
+
+ yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+ utb.actime = 1000;
+ utb.modtime = 2000;
+ result = yaffs_futime(h,&utb);
+ printf("futime to a 1000 m 2000 result %d\n",result);
+ yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+
+ utb.actime = 5000;
+ utb.modtime = 8000;
+ result = yaffs_utime(name, &utb);
+ printf("utime to a 5000 m 8000 result %d\n",result);
+ yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+ result = yaffs_utime(name, NULL);
+ printf("utime to NULL result %d\n",result);
+ yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+
+}
+
void basic_xattr_test(const char *mountpt)
{
char name[100];
@@ -2665,7 +2709,7 @@ void test_flash_traffic(const char *mountpt)
yaffs_start_up();
yaffs_mount(mountpt);
-
+
dev = yaffs_getdev(mountpt);
strcpy(name0,mountpt);
@@ -2690,7 +2734,7 @@ void link_follow_test(const char *mountpt)
char hn[100];
int result;
int h;
-
+
yaffs_trace_mask = 0;
yaffs_start_up();
@@ -2700,7 +2744,7 @@ void link_follow_test(const char *mountpt)
sprintf(fn,"%s/file",mountpt);
sprintf(sn,"%s/sym",mountpt);
sprintf(hn,"%s/hl-sym",mountpt);
-
+
h = yaffs_open(fn,O_CREAT| O_RDWR, S_IREAD | S_IWRITE);
result = yaffs_close(h);
@@ -2718,23 +2762,23 @@ int main(int argc, char *argv[])
{
random_seed = time(NULL);
//return long_test(argc,argv);
-
+
//return cache_read_test();
-
+
// resize_stress_test_no_grow("/flash/flash",20);
//root_perm_remount("/flash/flash");
-
+
//huge_directory_test_on_path("/ram2k");
-
+
//yaffs_backward_scan_test("/flash/flash");
// yaffs_device_flush_test("/flash/flash");
//rename_over_test("//////////////////flash///////////////////yaffs1///////////");
-
+
//fill_empty_files_test("/yaffs2/");
//resize_stress_test("/yaffs2");
//overwrite_test("/yaffs2");
-
+
//long_name_test("/yaffs2");
//link_test0("/yaffs2");
//link_test1("yaffs2");
@@ -2752,7 +2796,7 @@ int main(int argc, char *argv[])
// handle_test("yaffs2/");
-
+
//long_test_on_path("/ram2k");
// long_test_on_path("/flash");
//simple_rw_test("/flash/flash");
@@ -2760,23 +2804,24 @@ int main(int argc, char *argv[])
// rename_over_test("/flash");
//lookup_test("/flash");
//freespace_test("/flash/flash");
-
+
//link_test("/flash/flash");
-
+
// cache_bypass_bug_test();
-
+
//free_space_check();
-
+
//check_resize_gc_bug("/flash");
-
+
//basic_xattr_test("/yaffs2");
//big_xattr_test("/yaffs2");
//null_name_test("yaffs2");
- test_flash_traffic("yaffs2");
- link_follow_test("/yaffs2");
+ //test_flash_traffic("yaffs2");
+ // link_follow_test("/yaffs2");
+ basic_utime_test("/yaffs2");
return 0;
-
+
}
diff --git a/direct/basic-test/yaffs_fileem.c b/direct/basic-test/yaffs_fileem.c
index 66ba93a..267e134 100644
--- a/direct/basic-test/yaffs_fileem.c
+++ b/direct/basic-test/yaffs_fileem.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yaffs_fileem2k.c b/direct/basic-test/yaffs_fileem2k.c
index 52f1e11..836d1f7 100644
--- a/direct/basic-test/yaffs_fileem2k.c
+++ b/direct/basic-test/yaffs_fileem2k.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -26,7 +26,6 @@ const char *yaffs_flashif2_c_version = "$Id: yaffs_fileem2k.c,v 1.24 2010-02-18
#include "yaffs_guts.h"
#include "yaffs_fileem2k.h"
#include "yaffs_packedtags2.h"
-#include "yaffs_tagsvalidity.h"
#include <sys/types.h>
@@ -407,7 +406,7 @@ int yflash2_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev,int nand_chunk, u8 *
/* Got to suck the tags out of the data area */
if(!data) {
localData=1;
- data = yaffs_get_temp_buffer(dev,__LINE__);
+ data = yaffs_get_temp_buffer(dev);
}
@@ -428,7 +427,7 @@ int yflash2_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev,int nand_chunk, u8 *
retval = YAFFS_FAIL;
if(localData)
- yaffs_release_temp_buffer(dev,data,__LINE__);
+ yaffs_release_temp_buffer(dev, data);
@@ -460,14 +459,10 @@ int yflash2_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev,int nand_chunk, u8 *
nread= read(h,tags,sizeof(struct yaffs_ext_tags));
if(nread != sizeof(struct yaffs_ext_tags))
retval = YAFFS_FAIL;
- if(yaffs_check_all_ff((u8 *)tags,sizeof(struct yaffs_ext_tags)))
- {
- yaffs_init_tags(tags);
- }
+ if(yaffs_check_all_ff((u8 *)tags, sizeof(struct yaffs_ext_tags)))
+ memset(tags, 0, sizeof(struct yaffs_ext_tags));
else
- {
tags->chunk_used = 1;
- }
}
else
{
@@ -599,7 +594,7 @@ int yflash2_QueryNANDBlock(struct yaffs_dev *dev, int block_no, enum yaffs_block
}
else if(tags.chunk_used)
{
- *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
*seq_number = tags.seq_number;
}
return YAFFS_OK;
diff --git a/direct/basic-test/yaffs_fileem2k.h b/direct/basic-test/yaffs_fileem2k.h
index 2b6f6e9..e2e8dc3 100644
--- a/direct/basic-test/yaffs_fileem2k.h
+++ b/direct/basic-test/yaffs_fileem2k.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yaffs_norif1.c b/direct/basic-test/yaffs_norif1.c
index 5394f0e..98008b5 100644
--- a/direct/basic-test/yaffs_norif1.c
+++ b/direct/basic-test/yaffs_norif1.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -161,12 +161,12 @@ int ynorif1_WriteChunkToNAND(struct yaffs_dev *dev,int nand_chunk,const u8 *data
*/
if(sizeof(struct yaffs_spare) != 16)
- YBUG();
+ BUG();
if(data && spare)
{
if(spare->page_status != 0xff)
- YBUG();
+ BUG();
/* Write a pre-marker */
memset(&tmpSpare,0xff,sizeof(tmpSpare));
tmpSpare.page_status = YNOR_PREMARKER;
@@ -196,7 +196,7 @@ int ynorif1_WriteChunkToNAND(struct yaffs_dev *dev,int nand_chunk,const u8 *data
ynorif1_FlashWrite32(spareAddr,(u32 *)&tmpSpare,16/ 4);
}
else {
- YBUG();
+ BUG();
}
diff --git a/direct/basic-test/yaffs_norif1.h b/direct/basic-test/yaffs_norif1.h
index 71cb51f..72952b4 100644
--- a/direct/basic-test/yaffs_norif1.h
+++ b/direct/basic-test/yaffs_norif1.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yaffs_osglue.c b/direct/basic-test/yaffs_osglue.c
index 6e8870b..885fb80 100644
--- a/direct/basic-test/yaffs_osglue.c
+++ b/direct/basic-test/yaffs_osglue.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -75,7 +75,7 @@ void yaffsfs_LockInit(void)
u32 yaffsfs_CurrentTime(void)
{
- return 0;
+ return time(NULL);
}
@@ -83,7 +83,7 @@ static int yaffs_kill_alloc = 0;
static size_t total_malloced = 0;
static size_t malloc_limit = 0 & 6000000;
-void *yaffs_malloc(size_t size)
+void *yaffsfs_malloc(size_t size)
{
void * this;
if(yaffs_kill_alloc)
@@ -97,7 +97,7 @@ void *yaffs_malloc(size_t size)
return this;
}
-void yaffs_free(void *ptr)
+void yaffsfs_free(void *ptr)
{
free(ptr);
}
diff --git a/direct/basic-test/yaffs_ramdisk.c b/direct/basic-test/yaffs_ramdisk.c
index 5d389b9..bea5cfb 100644
--- a/direct/basic-test/yaffs_ramdisk.c
+++ b/direct/basic-test/yaffs_ramdisk.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yaffs_ramdisk.h b/direct/basic-test/yaffs_ramdisk.h
index 1749c58..f0f431b 100644
--- a/direct/basic-test/yaffs_ramdisk.h
+++ b/direct/basic-test/yaffs_ramdisk.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yaffs_ramem2k.c b/direct/basic-test/yaffs_ramem2k.c
index e86760b..5bd0aff 100644
--- a/direct/basic-test/yaffs_ramem2k.c
+++ b/direct/basic-test/yaffs_ramem2k.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -351,7 +351,7 @@ int nandemul2k_QueryNANDBlock(struct yaffs_dev *dev, int block_no, enum yaffs_bl
}
else if(tags.chunk_used)
{
- *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
*seq_number = tags.seq_number;
}
return YAFFS_OK;
diff --git a/direct/basic-test/yaffscfg.c b/direct/basic-test/yaffscfg.c
index ce86587..bc277e3 100644
--- a/direct/basic-test/yaffscfg.c
+++ b/direct/basic-test/yaffscfg.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yaffscfg2k.c b/direct/basic-test/yaffscfg2k.c
index f83aad1..441ee05 100644
--- a/direct/basic-test/yaffscfg2k.c
+++ b/direct/basic-test/yaffscfg2k.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yaffsnewcfg.c b/direct/basic-test/yaffsnewcfg.c
index 5add1e6..06ae645 100644
--- a/direct/basic-test/yaffsnewcfg.c
+++ b/direct/basic-test/yaffsnewcfg.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/ynorsim.c b/direct/basic-test/ynorsim.c
index 3965101..36bfa62 100644
--- a/direct/basic-test/ynorsim.c
+++ b/direct/basic-test/ynorsim.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/ynorsim.h b/direct/basic-test/ynorsim.h
index ca5bdf1..6b1193f 100644
--- a/direct/basic-test/ynorsim.h
+++ b/direct/basic-test/ynorsim.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yramsim.c b/direct/basic-test/yramsim.c
index 1fbf5fe..baa31b1 100644
--- a/direct/basic-test/yramsim.c
+++ b/direct/basic-test/yramsim.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/basic-test/yramsim.h b/direct/basic-test/yramsim.h
index b27b69f..3e57070 100644
--- a/direct/basic-test/yramsim.h
+++ b/direct/basic-test/yramsim.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/python/Makefile b/direct/python/Makefile
index 4a54185..e0b10e7 100644
--- a/direct/python/Makefile
+++ b/direct/python/Makefile
@@ -34,9 +34,10 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
yaffs_nandif.o yaffs_attribs.o \
yaffsfs.o yaffs_ecc.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o \
+ yaffs_summary.o \
yaffs_allocator.o \
yaffs_norif1.o ynorsim.o \
yaffs_bitmap.o \
@@ -52,7 +53,8 @@ YAFFSLIBOBJS = $(COMMONTESTOBJS) yaffs_python_helper.o
YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_summary.c yaffs_summary.h \
yaffs_nameval.c yaffs_nameval.h yaffs_attribs.h \
yaffs_trace.h \
yaffs_allocator.c yaffs_allocator.h \
diff --git a/direct/python/examples.py b/direct/python/examples.py
index 155e770..68fc95c 100644
--- a/direct/python/examples.py
+++ b/direct/python/examples.py
@@ -30,12 +30,12 @@ def yaffs_ls(dname):
isDir = True if st.st_mode & 0x4000 else False
if isFile :
- print "File ",se.d_ino, hex(perms), st.st_size, fullname
+ print "File ",se.d_ino, hex(perms), st.st_size, fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime
elif isDir :
- print "Dir ",se.d_ino, hex(perms), fullname
+ print "Dir ",se.d_ino, hex(perms), fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime
yaffs_ls(fullname)
else :
- print "Other (",hex(st.st_mode),") ",se.d_ino, hex(perms), fullname
+ print "Other (",hex(st.st_mode),") ",se.d_ino, hex(perms), fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime
sep = yaffs_readdir(dc)
yaffs_closedir(dc)
@@ -96,4 +96,3 @@ h = yaffs_open(root+"/dd/111",66,0666)
yaffs_close(h)
yaffs_ls(root)
-
diff --git a/direct/python/yaffs_python_helper.c b/direct/python/yaffs_python_helper.c
index 333ad58..e473bb3 100644
--- a/direct/python/yaffs_python_helper.c
+++ b/direct/python/yaffs_python_helper.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/python/yaffsfs.py b/direct/python/yaffsfs.py
index 1da25fd..79b6adb 100644
--- a/direct/python/yaffsfs.py
+++ b/direct/python/yaffsfs.py
@@ -171,21 +171,21 @@ class yaffs_dirent_struct(Structure):
#yaffs_DIR *yaffs_opendir(const YCHAR *dirname) ;
yaffs_opendir = ylib.yaffs_opendir
yaffs_opendir.argtypes = [c_char_p]
-yaffs_opendir.restype = c_int
+yaffs_opendir.restype = c_void_p
#struct yaffs_dirent *yaffs_readdir(yaffs_DIR *dirp) ;
yaffs_readdir= ylib.yaffs_readdir
-yaffs_readdir.argtypes=[c_int]
+yaffs_readdir.argtypes=[c_void_p]
yaffs_readdir.restype=POINTER(yaffs_dirent_struct)
#void yaffs_rewinddir(yaffs_DIR *dirp) ;
yaffs_rewinddir = ylib.yaffs_rewinddir
-yaffs_rewinddir.argtypes = [c_int]
-yaffs_rewinddir.restype = c_int ###### Should be void
+yaffs_rewinddir.argtypes = [c_void_p]
+yaffs_rewinddir.restype = None # void
#int yaffs_closedir(yaffs_DIR *dirp) ;
yaffs_closedir = ylib.yaffs_closedir
-yaffs_closedir.argtypes = [c_int]
+yaffs_closedir.argtypes = [c_void_p]
yaffs_closedir.restype = c_int
diff --git a/direct/tests/Makefile b/direct/tests/Makefile
index 00db67d..1389552 100644
--- a/direct/tests/Makefile
+++ b/direct/tests/Makefile
@@ -33,7 +33,7 @@ CFLAGS += -Wextra -Wpointer-arith
COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o yaffs_attribs.o \
yaffs_norif1.o ynorsim.o nor_stress.o yaffs_fsx.o \
@@ -41,7 +41,8 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
yaffs_bitmap.o \
yaffs_yaffs1.o \
yaffs_yaffs2.o \
- yaffs_verify.o
+ yaffs_verify.o \
+ yaffs_summary.o
# yaffs_checkptrwtest.o\
@@ -53,14 +54,15 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS))
YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
yaffs_nameval.c yaffs_nameval.h \
yaffs_trace.h yaffs_attribs.h \
yaffs_allocator.c yaffs_allocator.h \
yaffs_yaffs1.c yaffs_yaffs1.h \
yaffs_yaffs2.c yaffs_yaffs2.h \
yaffs_bitmap.c yaffs_bitmap.h \
- yaffs_verify.c yaffs_verify.h
+ yaffs_verify.c yaffs_verify.h \
+ yaffs_summary.c yaffs_summary.h
YAFFSDIRECTSYMLINKS = yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
yaffsfs.h yaffs_osglue.h ydirectenv.h \
diff --git a/direct/tests/fuzzer.c b/direct/tests/fuzzer.c
index 2eedbfa..9eaeefb 100644
--- a/direct/tests/fuzzer.c
+++ b/direct/tests/fuzzer.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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/tests/nor_stress.c b/direct/tests/nor_stress.c
index 730bd43..e62095d 100644
--- a/direct/tests/nor_stress.c
+++ b/direct/tests/nor_stress.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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/tests/nor_stress.h b/direct/tests/nor_stress.h
index 69c335d..e7081b2 100644
--- a/direct/tests/nor_stress.h
+++ b/direct/tests/nor_stress.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/tests/yaffs_test.c b/direct/tests/yaffs_test.c
index b35c750..5df17f8 100644
--- a/direct/tests/yaffs_test.c
+++ b/direct/tests/yaffs_test.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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/timothy_tests/dev/Makefile b/direct/timothy_tests/dev/Makefile
index 672a33f..6e774ab 100644
--- a/direct/timothy_tests/dev/Makefile
+++ b/direct/timothy_tests/dev/Makefile
@@ -29,10 +29,24 @@ CFLAGS += -Wextra -Wpointer-arith
#CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
#CFLAGS+= -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
+COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
+ yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
+ yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
+ yaffs_checkptrw.o yaffs_qsort.o\
+ yaffs_nameval.o yaffs_attribs.o \
+ yaffs_norif1.o ynorsim.o \
+ yaffs_allocator.o \
+ yaffs_bitmap.o \
+ yaffs_yaffs1.o \
+ yaffs_yaffs2.o \
+ yaffs_verify.o
+
-COMMONTESTOBJS = yaffscfg2k.o yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
+SSCOMMONTESTOBJS = yaffscfg2k.o yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
+ yaffs_attribs.o yaffs_allocator.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o \
yaffs_norif1.o ynorsim.o \
@@ -49,12 +63,12 @@ YAFFSTESTOBJS = $(COMMONTESTOBJS) yaffs_tester.o message_buffer.o error_handler
ALLOBJS = $(sort $(YAFFSTESTOBJS))
-YAFFSSYMLINKS = devextras.h yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffsinterface.h yportenv.h yaffs_tagscompat.c yaffs_tagscompat.h \
- yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h yaffs_nandemul2k.h \
- yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h yaffs_list.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
+ yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
+ yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
yaffs_nameval.c yaffs_nameval.h \
- yaffs_qsort.c yaffs_qsort.h yaffs_trace.h \
+ yaffs_trace.h yaffs_attribs.h \
yaffs_allocator.c yaffs_allocator.h \
yaffs_yaffs1.c yaffs_yaffs1.h \
yaffs_yaffs2.c yaffs_yaffs2.h \
@@ -62,15 +76,18 @@ YAFFSSYMLINKS = devextras.h yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h ya
yaffs_verify.c yaffs_verify.h
YAFFSDIRECTSYMLINKS = yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
- yaffsfs.h yaffs_malloc.h ydirectenv.h \
- yaffs_flashif.c yaffscfg.h \
- yaffs_nandif.c yaffs_nandif.h
+ yaffsfs.h yaffs_osglue.h ydirectenv.h \
+ yaffs_flashif.c yaffscfg.h yaffs_qsort.c \
+ yaffs_nandemul2k.h yaffs_list.h \
+ yaffs_attribs.c \
+ yaffs_nandif.c yaffs_nandif.h yportenv.h \
+ yaffs_hweight.c yaffs_hweight.h
DIRECTEXTRASYMLINKS = yaffscfg2k.c yaffs_fileem2k.c yaffs_fileem2k.h\
yaffs_fileem.c yaffs_norif1.c yaffs_norif1.h \
yaffs_ramdisk.c yaffs_ramdisk.h yaffs_ramem2k.c \
- ynorsim.h ynorsim.c
+ ynorsim.h ynorsim.c yaffs_osglue.c
SYMLINKS = $(YAFFSSYMLINKS) $(YAFFSDIRECTSYMLINKS) $(DIRECTEXTRASYMLINKS)
#all: directtest2k boottest
diff --git a/direct/timothy_tests/dev/error_handler.c b/direct/timothy_tests/dev/error_handler.c
index 1dd2729..a9152f3 100644
--- a/direct/timothy_tests/dev/error_handler.c
+++ b/direct/timothy_tests/dev/error_handler.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/dev/error_handler.h b/direct/timothy_tests/dev/error_handler.h
index c07fdff..979f020 100644
--- a/direct/timothy_tests/dev/error_handler.h
+++ b/direct/timothy_tests/dev/error_handler.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/dev/message_buffer.c b/direct/timothy_tests/dev/message_buffer.c
index 1ff21e0..adefbf8 100644
--- a/direct/timothy_tests/dev/message_buffer.c
+++ b/direct/timothy_tests/dev/message_buffer.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/dev/message_buffer.h b/direct/timothy_tests/dev/message_buffer.h
index 2f7984f..55f9e10 100644
--- a/direct/timothy_tests/dev/message_buffer.h
+++ b/direct/timothy_tests/dev/message_buffer.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/dev/yaffs_tester.c b/direct/timothy_tests/dev/yaffs_tester.c
index 68353d0..65d2d17 100644
--- a/direct/timothy_tests/dev/yaffs_tester.c
+++ b/direct/timothy_tests/dev/yaffs_tester.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/dev/yaffs_tester.h b/direct/timothy_tests/dev/yaffs_tester.h
index 626609c..a703175 100644
--- a/direct/timothy_tests/dev/yaffs_tester.h
+++ b/direct/timothy_tests/dev/yaffs_tester.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/handle_tests/Makefile b/direct/timothy_tests/handle_tests/Makefile
index 6ad275c..8ca9c1d 100644
--- a/direct/timothy_tests/handle_tests/Makefile
+++ b/direct/timothy_tests/handle_tests/Makefile
@@ -33,7 +33,7 @@ CFLAGS += -Wextra -Wpointer-arith
COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o yaffs_attribs.o \
yaffs_norif1.o ynorsim.o \
@@ -59,7 +59,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS)) $(PYTHONOBJS)
YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
yaffs_nameval.c yaffs_nameval.h \
yaffs_trace.h yaffs_attribs.h \
yaffs_allocator.c yaffs_allocator.h \
diff --git a/direct/timothy_tests/handle_tests/handle_test.c b/direct/timothy_tests/handle_tests/handle_test.c
index 6182abf..4d6e33d 100644
--- a/direct/timothy_tests/handle_tests/handle_test.c
+++ b/direct/timothy_tests/handle_tests/handle_test.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/handle_tests/handle_test.h b/direct/timothy_tests/handle_tests/handle_test.h
index 3ab2510..dd7febe 100644
--- a/direct/timothy_tests/handle_tests/handle_test.h
+++ b/direct/timothy_tests/handle_tests/handle_test.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/Makefile b/direct/timothy_tests/mirror_tests/Makefile
index 8d74acf..05e41f4 100644
--- a/direct/timothy_tests/mirror_tests/Makefile
+++ b/direct/timothy_tests/mirror_tests/Makefile
@@ -33,7 +33,7 @@ CFLAGS += -Wextra -Wpointer-arith
COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o yaffs_attribs.o \
yaffs_norif1.o ynorsim.o \
@@ -63,7 +63,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS)) $(PYTHONOBJS)
YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
yaffs_nameval.c yaffs_nameval.h \
yaffs_trace.h yaffs_attribs.h \
yaffs_allocator.c yaffs_allocator.h \
diff --git a/direct/timothy_tests/mirror_tests/lib.c b/direct/timothy_tests/mirror_tests/lib.c
index e21e77d..079ed25 100644
--- a/direct/timothy_tests/mirror_tests/lib.c
+++ b/direct/timothy_tests/mirror_tests/lib.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/lib.h b/direct/timothy_tests/mirror_tests/lib.h
index 48adc94..0b33479 100644
--- a/direct/timothy_tests/mirror_tests/lib.h
+++ b/direct/timothy_tests/mirror_tests/lib.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_open.c b/direct/timothy_tests/mirror_tests/linux_test_open.c
index 0f90039..871dc56 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_open.c
+++ b/direct/timothy_tests/mirror_tests/linux_test_open.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_open.h b/direct/timothy_tests/mirror_tests/linux_test_open.h
index 40d3492..6274934 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_open.h
+++ b/direct/timothy_tests/mirror_tests/linux_test_open.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_truncate.c b/direct/timothy_tests/mirror_tests/linux_test_truncate.c
index 8cdaace..94e8959 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_truncate.c
+++ b/direct/timothy_tests/mirror_tests/linux_test_truncate.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_truncate.h b/direct/timothy_tests/mirror_tests/linux_test_truncate.h
index 219c96d..7ef91d0 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_truncate.h
+++ b/direct/timothy_tests/mirror_tests/linux_test_truncate.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_unlink.c b/direct/timothy_tests/mirror_tests/linux_test_unlink.c
index f22a57b..575e7ae 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_unlink.c
+++ b/direct/timothy_tests/mirror_tests/linux_test_unlink.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_unlink.h b/direct/timothy_tests/mirror_tests/linux_test_unlink.h
index aac3bcd..7572aa8 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_unlink.h
+++ b/direct/timothy_tests/mirror_tests/linux_test_unlink.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_write.c b/direct/timothy_tests/mirror_tests/linux_test_write.c
index 9714c19..b46c211 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_write.c
+++ b/direct/timothy_tests/mirror_tests/linux_test_write.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/linux_test_write.h b/direct/timothy_tests/mirror_tests/linux_test_write.h
index ceb29fa..611fe7d 100644
--- a/direct/timothy_tests/mirror_tests/linux_test_write.h
+++ b/direct/timothy_tests/mirror_tests/linux_test_write.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/mirror_tests.c b/direct/timothy_tests/mirror_tests/mirror_tests.c
index aa9cd5b..cd4e5f2 100644
--- a/direct/timothy_tests/mirror_tests/mirror_tests.c
+++ b/direct/timothy_tests/mirror_tests/mirror_tests.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/mirror_tests.h b/direct/timothy_tests/mirror_tests/mirror_tests.h
index 31b6c14..9d30833 100644
--- a/direct/timothy_tests/mirror_tests/mirror_tests.h
+++ b/direct/timothy_tests/mirror_tests/mirror_tests.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_open.c b/direct/timothy_tests/mirror_tests/yaffs_test_open.c
index 87a824b..daeb8a4 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_open.c
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_open.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_open.h b/direct/timothy_tests/mirror_tests/yaffs_test_open.h
index f9e4224..d64bd29 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_open.h
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_open.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_truncate.c b/direct/timothy_tests/mirror_tests/yaffs_test_truncate.c
index 688d66e..9e99590 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_truncate.c
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_truncate.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_truncate.h b/direct/timothy_tests/mirror_tests/yaffs_test_truncate.h
index cf19013..02517cb 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_truncate.h
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_truncate.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_unlink.c b/direct/timothy_tests/mirror_tests/yaffs_test_unlink.c
index a6f1497..6982e77 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_unlink.c
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_unlink.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_unlink.h b/direct/timothy_tests/mirror_tests/yaffs_test_unlink.h
index 4d1b881..cb8fdf2 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_unlink.h
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_unlink.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_write.c b/direct/timothy_tests/mirror_tests/yaffs_test_write.c
index a348003..2820d68 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_write.c
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_write.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/mirror_tests/yaffs_test_write.h b/direct/timothy_tests/mirror_tests/yaffs_test_write.h
index 3d6220e..0332f6f 100644
--- a/direct/timothy_tests/mirror_tests/yaffs_test_write.h
+++ b/direct/timothy_tests/mirror_tests/yaffs_test_write.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/Makefile b/direct/timothy_tests/quick_tests/Makefile
index f798ce9..ef339c5 100644
--- a/direct/timothy_tests/quick_tests/Makefile
+++ b/direct/timothy_tests/quick_tests/Makefile
@@ -33,7 +33,7 @@ CFLAGS += -Wextra -Wpointer-arith
COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o yaffs_attribs.o \
yaffs_norif1.o ynorsim.o \
@@ -120,7 +120,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS))
YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
yaffs_nameval.c yaffs_nameval.h \
yaffs_trace.h yaffs_attribs.h \
yaffs_allocator.c yaffs_allocator.h \
diff --git a/direct/timothy_tests/quick_tests/lib.c b/direct/timothy_tests/quick_tests/lib.c
index e297645..50723c3 100644
--- a/direct/timothy_tests/quick_tests/lib.c
+++ b/direct/timothy_tests/quick_tests/lib.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/lib.h b/direct/timothy_tests/quick_tests/lib.h
index 72376b5..c7d67d2 100644
--- a/direct/timothy_tests/quick_tests/lib.h
+++ b/direct/timothy_tests/quick_tests/lib.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/quick_tests.c b/direct/timothy_tests/quick_tests/quick_tests.c
index b2864a0..a3f6463 100644
--- a/direct/timothy_tests/quick_tests/quick_tests.c
+++ b/direct/timothy_tests/quick_tests/quick_tests.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/quick_tests.h b/direct/timothy_tests/quick_tests/quick_tests.h
index 725ead2..ed0d336 100644
--- a/direct/timothy_tests/quick_tests/quick_tests.h
+++ b/direct/timothy_tests/quick_tests/quick_tests.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access.c b/direct/timothy_tests/quick_tests/test_yaffs_access.c
index da4f23e..1e516bc 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access.h b/direct/timothy_tests/quick_tests/test_yaffs_access.h
index 9919498..e4b4a19 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.c b/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.c
index 8aaa35d..1cbd0a6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.h b/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.h
index 7cb624b..1c0864c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.c
index f8ba13a..f7b7e07 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.h
index 62fe9e2..90768bb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.c b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.c
index 8338cc4..715e236 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.h b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.h
index 089aeab..cb2f71b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.c
index 9f574d7..49fbbf0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.h
index 45e8e6d..096e952 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c
index a233250..95bf32c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.h
index 40dc027..f37ac2e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.c
index 3746886..8e58b17 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.h
index ed24f95..68361f0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.c
index a436dbb..2015a65 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.h
index 41afd09..b38f9eb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.c
index 2dda915..afd3e07 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.h
index 0f18c90..917ab56 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.c
index 5944ec1..0560337 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.h
index ebf91fb..47a0dc4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c
index 71e76d0..5b1e822 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h
index f9e2bf8..cc3f93c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod.c
index 47646f3..7259fcb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod.h
index 11b3dc4..2ec932f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.c
index 04e5f8b..df0205f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.h
index ba3e5a5..b45db14 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.c
index ae62f54..d60c451 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.h
index 3254f62..4cc5c86 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.c
index 1df90c5..bad5961 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.h
index f47f53c..7ccaef2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c
index 9c7faa3..41e5aa4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.h
index 5d6686e..5a5362b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.c
index d931485..1ea97e4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.h
index 16f28f0..33c1c20 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.c
index a070a8a..e29821d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.h
index 583c8b1..cd754cb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.c
index 7915422..4587315 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.h
index 47c10c7..923ec30 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.c
index 26e701c..fd8af69 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.h
index 9b3f2d3..53df16f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c
index 00da37b..339b346 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h
index ec589e8..e18fd5f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.c
index a058d98..9833231 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.h
index 68ca4f8..2ca551b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c
index 096f783..99e5021 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h
index 901d2d2..8b3023c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_dup.c b/direct/timothy_tests/quick_tests/test_yaffs_dup.c
index 07ef59d..2a0f63a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_dup.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_dup.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_dup.h b/direct/timothy_tests/quick_tests/test_yaffs_dup.h
index 170203d..0bc5035 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_dup.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_dup.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.c
index f919744..e0f5a99 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.h
index 7cfc1f1..4f1ad93 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod.c b/direct/timothy_tests/quick_tests/test_yaffs_fchmod.c
index ff924be..e1a0356 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod.h b/direct/timothy_tests/quick_tests/test_yaffs_fchmod.h
index a040fed..643893e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.c
index ce31a4c..faed470 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.h
index 14be155..c37d7c4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.c
index 61bb7b4..6ea6e60 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.h
index 0c7e2dc..4d018be 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.c
index c3fcfea..250ebc6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.h
index d360f63..1c871df 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c
index 2bc5005..f96e0d2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h
index 0197876..3bd69a1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.c b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.c
index 7711d50..b272b8a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.h b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.h
index 905e691..179548d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.c
index 0e0786a..2c3089f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.h
index d562c56..5dc15df 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.c
index 9820904..bad5f01 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.h
index 28ecb00..53580bb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c
index 801d7a9..1320ea4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h
index 5c2b8df..69bd343 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush.c b/direct/timothy_tests/quick_tests/test_yaffs_flush.c
index c2417fb..c7380a6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_flush.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_flush.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush.h b/direct/timothy_tests/quick_tests/test_yaffs_flush.h
index f1fccea..b22b420 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_flush.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_flush.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.c
index 9daf090..5cb6ece 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.h
index f88d003..fe10807 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.c
index e31af7f..41a7450 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.h
index b912a15..b948db7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace.c b/direct/timothy_tests/quick_tests/test_yaffs_freespace.c
index 8d714d8..bc141de 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace.h b/direct/timothy_tests/quick_tests/test_yaffs_freespace.h
index 8644be7..91183ed 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.c
index 29f3cd0..5cee247 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.h
index 068664b..b387dcf 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c
index 40f2d35..c3cd19a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.h
index 11e4cbe..4c1aab9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.c
index bac5471..3451c54 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.h
index d50b505..54b1f75 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fstat.c b/direct/timothy_tests/quick_tests/test_yaffs_fstat.c
index dfdc80d..c19ddea 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fstat.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fstat.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fstat.h b/direct/timothy_tests/quick_tests/test_yaffs_fstat.h
index d4921f8..4c293b1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fstat.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fstat.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.c
index 546ebea..dace9f9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.h
index 453d8c2..f6b063e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fsync.c b/direct/timothy_tests/quick_tests/test_yaffs_fsync.c
index cff6ac1..cec8fec 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fsync.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fsync.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fsync.h b/direct/timothy_tests/quick_tests/test_yaffs_fsync.h
index cbb9e0f..bd12182 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fsync.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fsync.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.c
index 3f6e0c2..ce10399 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.h
index fb689bb..4661790 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.c
index a4e3081..729fad1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.h
index 0e8ef42..4d6c8a1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.c b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.c
index cb38009..6c570a5 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.h b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.h
index 9788997..429e5df 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.c
index 1e09d6f..d384b98 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.h
index 895013c..db1b3c4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.c
index 15096ea..31f5e08 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.h
index 49a5fd6..948d583 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.c
index 1068bb8..e7855b0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.h
index 18ba182..d1120e3 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c
index dcb25fa..484447d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h
index 7ae0038..afd5110 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount.c b/direct/timothy_tests/quick_tests/test_yaffs_inodecount.c
index 7fe80f6..e9f75ac 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount.h b/direct/timothy_tests/quick_tests/test_yaffs_inodecount.h
index 8db7c7f..c7a5228 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.c
index 36ae0d9..185aafe 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.h
index 16e1858..e7d526b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c
index 432c6ce..1d999a8 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.h
index a0d91ac..b41da90 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.c
index cc4c5c2..1e3d1e6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.h
index 05dee0b..5fe35ef 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link.c b/direct/timothy_tests/quick_tests/test_yaffs_link.c
index 5a88c40..7aa8aab 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link.h b/direct/timothy_tests/quick_tests/test_yaffs_link.h
index ec6630f..0d3c508 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.c b/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.c
index 848c9b4..18a540b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.h b/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.h
index afb32a2..9772ed9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.c
index 31c0900..388ea53 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.h
index cfdb130..d477fd1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c
index ed3ddb5..816cebc 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.h
index 271002d..ce378c7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c
index b7d917d..88ace93 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.h
index 11e636e..81fff91 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.c
index 4c109b1..5c7f3e4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.h
index 5603901..6ec7eb0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.c
index 533f18d..43d0ad9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.h
index 39f712e..0d8a4ad 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.c
index 2976178..3267f94 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.h
index 5ea7a4f..16f18b6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.c
index c5aee18..a04e796 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.h
index 50813c3..2972c06 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c
index 6bfad08..62c8065 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.h
index 7b0b537..a967eb8 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.c b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.c
index 5602f3c..32d1e0b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.h b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.h
index bafee35..0aadf96 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c
index bfbd48b..da4abd6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.h
index 8ce4bcd..6ff4b99 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.c
index b0b5b73..6df0d2b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.h
index d8ff17c..4a43f02 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.c b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.c
index 0f8530d..bc0e6f2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.h b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.h
index af10217..190f197 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek.c b/direct/timothy_tests/quick_tests/test_yaffs_lseek.c
index f102fde..84ed1c3 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek.h b/direct/timothy_tests/quick_tests/test_yaffs_lseek.h
index 9854bae..2c28559 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c
index c6f4264..29af47f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.h
index 6911c80..8cec748 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c
index 2d3a244..a250309 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.h
index 4dae8dc..25dc8f9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.c
index 6e83eb4..1612dae 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.h
index ec1881b..081acca 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c b/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c
index 8e2c3e0..a0f6add 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h b/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h
index d14af52..6d1d488 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat.c b/direct/timothy_tests/quick_tests/test_yaffs_lstat.c
index 1d1ecbd..835d86a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat.h b/direct/timothy_tests/quick_tests/test_yaffs_lstat.h
index b460df2..884a6de 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c
index 466890c..80ea321 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.h
index 5b3baa6..ac18311 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.c
index 96083ae..b600580 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.h
index 9a48599..d778594 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.c
index 8aec2e6..665ff9f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.h
index 5db0c46..948a884 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.c
index f5f41a7..a6b91bc 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.h
index a5d4c96..f8d85f4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir.c
index 3427b23..543775b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir.h
index b59b454..5e016d3 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.c
index b83594e..2d94fa4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.h
index 9b5b338..c1c7376 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.c
index a33a1d1..9a44979 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.h
index 816f786..0c11adf 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c
index dba259e..630b82d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h
index 5b8528c..54961d6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.c
index 84cc3d1..ee20c30 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.h
index 4be6ecd..e454fc6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.c
index f626230..c417bb3 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.h
index 570b406..29a7a01 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.c
index 70bbfaf..f7dad34 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.h
index 23ad51d..b786e66 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.c
index 57832a9..3fb5c51 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.h
index 0a84931..81fe54d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount.c b/direct/timothy_tests/quick_tests/test_yaffs_mount.c
index 572ffe1..42f12ba 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount.h b/direct/timothy_tests/quick_tests/test_yaffs_mount.h
index 57405c6..716ce3b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount2.c b/direct/timothy_tests/quick_tests/test_yaffs_mount2.c
index 8bf856d..d065b2e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount2.h b/direct/timothy_tests/quick_tests/test_yaffs_mount2.h
index 4db4342..e3540e8 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.c b/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.c
index 92a1e74..9764742 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.h b/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.h
index dfaec01..b4c2f87 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.c b/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.c
index 6f5a673..96804a1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.h b/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.h
index 27fde7e..c69b944 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.c
index 0b36308..e0d6b32 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.h
index 7a914e4..26eb0d7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.c b/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.c
index f073d20..c53a7b8 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.h b/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.h
index 73522e8..538cb09 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.c
index 9fc6a2e..cb73609 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.h
index 010d884..aa8ee2a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open.c b/direct/timothy_tests/quick_tests/test_yaffs_open.c
index af7b754..52c88ad 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open.h b/direct/timothy_tests/quick_tests/test_yaffs_open.h
index 3fc83e0..9001c91 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.c
index 04de113..c3d9a71 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.h
index 83cc32a..618b2cb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c
index 5bcbf2b..922f431 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h
index ebc2107..2efa65d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.c
index fb596ca..c1f6c90 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.h
index 2e02ad3..58779b1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.c
index a0d86e2..ddbbf19 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.h
index 1531cbb..71770f3 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c
index 5d0a670..3246a52 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h
index fac12d7..9f985bb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.c b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.c
index 0a1380f..2c831bb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.h b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.h
index 60335a4..50cd3f6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.c
index 0f44248..0ce0312 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.h
index 9ee2f5f..4b0af38 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
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 228f736..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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.h
index 8527452..b6e9d71 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c
index c3eba4a..b5a8dd7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h
index abc576a..f43e4d0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c
index 0984308..4ec6a74 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h
index d611dd2..6f8ef2d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.c
index 0773b7d..981c799 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.h
index da82256..0fc304f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.c
index 4e497cd..d076b59 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.h
index 28b9b0b..93fbf82 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_open_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_read.c b/direct/timothy_tests/quick_tests/test_yaffs_read.c
index 98e3b3b..1bcf403 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_read.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_read.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_read.h b/direct/timothy_tests/quick_tests/test_yaffs_read.h
index bc01b47..2458a77 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_read.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_read.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.c
index 1ae9216..76447bc 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.h
index d17f5b8..0fc055a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.c
index 873f012..101c458 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.h
index df25d55..79b8d65 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.c
index 1f89ee7..53506b4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.h
index b425da4..a5ebd6b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c
index 6bde97c..b70551d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.h
index f4b5b67..30ee880 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.c
index 813de5c..babe1ab 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.h
index d37a5a1..435bea1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.c
index c9be564..aea41fb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.h
index e5bf18e..ae703cc 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.c
index e86f923..d8797ea 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.h
index 6772e7d..83da84c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.c
index fbb37c1..1ebc4b1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.h
index 7574695..e870f4c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.c
index 64dcfd7..276cb7c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.h
index 00646fb..c9e50a4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.c b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.c
index fbb37c1..1ebc4b1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.h b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.h
index 7574695..e870f4c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename.c b/direct/timothy_tests/quick_tests/test_yaffs_rename.c
index cc55fb1..170081e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename.h b/direct/timothy_tests/quick_tests/test_yaffs_rename.h
index 00f2fe4..7fcc4db 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.c
index 432be36..c5e2a26 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.h
index 9924d31..9b1fa74 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.c
index 716d7dc..a430577 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.h
index c44b5c6..cd76d40 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.c
index 37eafa5..c6e8b88 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.h
index f1f1f74..fd6b2c6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c
index 0c45302..0d6c072 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.h
index 56d4ce3..4055b6e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c
index d3cfcc3..2479590 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.h
index 8a1d9ce..0cd4d32 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.c
index 4757077..0256862 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.h
index 1b00f66..371fdff 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.c
index d788d62..7252638 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.h
index cdc9969..c63a41f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.c
index 851297f..768a2d6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.h
index cdabca4..484b6f6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.c
index ea73a2f..7977a9e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.h
index 2844f32..8738cb0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.c
index 998905a..f173e3f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.h
index ce3cf90..f4649bb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.c
index d6eb84c..70e3db7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.h
index 1b99f95..ac10f05 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.c
index 3485236..f86b705 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.h
index ffdd09d..9d19aa6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.c
index 9550cce..a47e2c5 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.h
index 0cdb256..375a41d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.c
index 9b15fa5..9b37209 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.h
index 1b99f95..ac10f05 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.c
index cea18f0..b191dbb 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.h
index b68bd5c..07cbec1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.c
index 8954828..efc87d0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.h
index a5c8136..57f8c42 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir.c
index 2fd7982..3775cc9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir.h
index e0445bc..036ca2a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.c
index 14949a8..738a56a 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.h
index 0503c17..88eb011 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.c
index d779306..3518ae2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.h
index 7ab77aa..7508222 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c
index 13c0ae0..028b122 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.h
index 6b65c2d..a4a0e1f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c
index a7942df..6519952 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.h
index 7ed43b8..b649584 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.c
index 1aec857..f5d6271 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.h
index 1dd6136..0e50000 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.c
index 413d08f..45f5685 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.h
index a00f4dc..2e2b6ac 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.c
index 60b6cca..6b8c046 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.h
index 2c1688a..e388486 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.c
index 17e28e6..ce467f6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.h
index a090435..4d394f9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.c
index 7b092c8..79f3997 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.h
index 8edd10b..b3fcfcc 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat.c b/direct/timothy_tests/quick_tests/test_yaffs_stat.c
index 838df1e..f3aa8f7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat.h b/direct/timothy_tests/quick_tests/test_yaffs_stat.h
index e389483..5e5b78b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.c
index ab83a8d..eee9ada 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.h b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.h
index 2cef067..05e173b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.c
index e2a4eca..c4d9f35 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.h
index ff40ea5..f0927ca 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c
index 826a2d2..47ac8c6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.h
index b4b0260..ab201d9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.c
index 9a740b8..92938e2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.h
index a2f8209..7fd4b23 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.c
index 1b4cce8..334cc61 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.h
index ea5d586..35c438c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.c
index c4a5910..c6773d3 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.h
index c279f8f..0973a8e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.c
index e2f37b6..3fb07cd 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.h
index 3f4e2fd..12f71b2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink.c
index ddebec1..be74057 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink.h
index e41bfeb..7a3dbc8 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c
index 31f9880..5eddb78 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h
index 04359f7..5a71540 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.c
index 843d835..69ff9d5 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.h
index 7b63716..ff3a3dc 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c
index f4b0072..9171238 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h
index 4d05ab2..777e74b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.c
index 64129b1..eac4e92 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.h
index b6dc53d..f5574c5 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.c
index cd4b60a..4be8df0 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.h
index 9633140..2dee1a7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.c
index 3844b0e..680f0aa 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.h
index e8f26eb..684b01e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.c
index 74a0b62..8962774 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.h
index 428d365..c8db976 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.c
index f7ab9dd..4aecb44 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.h
index 373436c..ffb5564 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.c b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.c
index d4b9d1c..e4acc08 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.h b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.h
index 14a87b7..8ccd121 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync.c b/direct/timothy_tests/quick_tests/test_yaffs_sync.c
index 9f7b03e..df54fef 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync.h b/direct/timothy_tests/quick_tests/test_yaffs_sync.h
index 82a7c9c..3cf2a86 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c
index d899836..dce9acf 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.h
index 1db7146..6efc438 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.c b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.c
index 90ae4a4..f14005e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.h b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.h
index e3aec49..afa692f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.c
index 4497b7c..7b6e1cd 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.h
index 3db9760..eabe97c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.c
index c8c35df..53caa55 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.h
index 2fa1ad1..0735883 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace.c b/direct/timothy_tests/quick_tests/test_yaffs_totalspace.c
index c3e054b..aad9f46 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace.h b/direct/timothy_tests/quick_tests/test_yaffs_totalspace.h
index f2ec0af..968dc99 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.c
index b4f0c52..6c3b1d7 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.h
index 4f64395..26f516c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c
index c31f389..d95501e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.h
index 487ae8d..683354c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.c
index 359639d..e77f3a9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.h
index 6f82e1d..db12782 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate.c
index e4cd7f9..185e39d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate.h
index 94a304a..fa071f6 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.c
index 26c70a1..6e6ef40 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.h
index 7a71a5e..d7b8451 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.c
index b6bd10f..d6000d9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.h
index 4e485ef..f39e822 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.c
index 0b4bb01..c7aa61e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.h
index fb7274b..3ac429b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.c
index 6f03a45..098325e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.h
index 552aab6..62bc182 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c
index cbd91da..998b14c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.h
index fd4ef73..eea7832 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.c
index 21b2873..d1697d1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.h
index 07fe6a4..897e89f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.c
index 67da0ad..6696b06 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.h
index a2a7da9..582bde9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c
index 0263ca1..a2d010f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.h
index 24120d4..f519625 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.c
index ae0662d..2840a67 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.h
index 45bde51..6bb96cf 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.c
index 95827e9..58fa590 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.h
index bbc96b5..72d2c37 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c
index 7ec30cf..4570db1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h b/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h
index 654673f..dfc5ede 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink.c
index 4436da6..f45b595 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink.h
index bab3476..fbff678 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.c
index ca5d660..37ddb0e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.h
index 6d4b2c8..3d9681e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.c
index f7d04e8..f046277 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.h
index a9802ac..5138ae2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.c
index 0515ab1..64d9ee1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.h
index dffaeb9..712927c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.c
index 113b148..9875304 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.h
index 1d419b8..e5f13d4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.c
index b08989f..c6085d2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.h
index a436614..ee8112c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.c
index 78d9cef..e75d121 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.h
index a4c1565..ae7be8b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.c
index f59dce0..7e1d602 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.h
index 0cc6ea2..9101e84 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.c
index 96bfcfa..29dea18 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.h
index a2f97a5..75b8ea9 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount.c
index 8111206..3bcfcc3 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount.h
index a6e2ea5..d9983fd 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount2.c
index d0b1408..c3272fe 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount2.h
index fc2e13b..3e5825e 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.c
index cafc508..ba51300 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.h
index b698dff..15329f2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.c
index 4311438..d492b89 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.h
index dc2b1fa..32e16a4 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.c
index 982f2bd..e18c803 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h
index e60f117..e36af09 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.c
index b7f7c12..5a20f88 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h
index 7574695..e870f4c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.c
index 88c93dd..d056fde 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.h
index c40b6a3..2cdbf91 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.c
index ecceb22..a76512f 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.h
index 557689f..a409eef 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.c
index 7472451..74283a2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.h
index 630ccbd..21ea93b 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.c b/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.c
index 5788bde..9c318dd 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.h b/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.h
index f088666..7178f4d 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write.c b/direct/timothy_tests/quick_tests/test_yaffs_write.c
index 6695cca..166c521 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write.h b/direct/timothy_tests/quick_tests/test_yaffs_write.h
index 022d5d4..bc079b2 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.c b/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.c
index 5ed718e..c1cb4dd 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.h b/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.h
index db03ed6..facef12 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.c b/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.c
index f0071ea..fed646c 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.h b/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.h
index e66008a..c0e7aa1 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.c b/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.c
index a17dd89..9999466 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.c
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h b/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h
index 1596e44..2088527 100644
--- a/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h
+++ b/direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/threading/Makefile b/direct/timothy_tests/threading/Makefile
index 8006b79..e733471 100644
--- a/direct/timothy_tests/threading/Makefile
+++ b/direct/timothy_tests/threading/Makefile
@@ -33,7 +33,7 @@ CFLAGS += -Wextra -Wpointer-arith
COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
- yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+ yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
yaffs_checkptrw.o yaffs_qsort.o\
yaffs_nameval.o yaffs_attribs.o \
yaffs_norif1.o ynorsim.o \
@@ -58,7 +58,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS))
YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
- yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+ yaffs_checkptrw.h yaffs_checkptrw.c \
yaffs_nameval.c yaffs_nameval.h \
yaffs_trace.h yaffs_attribs.h \
yaffs_allocator.c yaffs_allocator.h \
diff --git a/direct/timothy_tests/threading/lib.c b/direct/timothy_tests/threading/lib.c
index 55084a2..c31f627 100644
--- a/direct/timothy_tests/threading/lib.c
+++ b/direct/timothy_tests/threading/lib.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/threading/lib.h b/direct/timothy_tests/threading/lib.h
index f635294..cb4708a 100644
--- a/direct/timothy_tests/threading/lib.h
+++ b/direct/timothy_tests/threading/lib.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/threading/test_a.c b/direct/timothy_tests/threading/test_a.c
index 5e1af54..a4bd415 100644
--- a/direct/timothy_tests/threading/test_a.c
+++ b/direct/timothy_tests/threading/test_a.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/threading/test_a.h b/direct/timothy_tests/threading/test_a.h
index 87cb3df..f60d694 100644
--- a/direct/timothy_tests/threading/test_a.h
+++ b/direct/timothy_tests/threading/test_a.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/threading/test_b.c b/direct/timothy_tests/threading/test_b.c
index 0476113..416fdcb 100644
--- a/direct/timothy_tests/threading/test_b.c
+++ b/direct/timothy_tests/threading/test_b.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/threading/test_b.h b/direct/timothy_tests/threading/test_b.h
index c242a93..a499b87 100644
--- a/direct/timothy_tests/threading/test_b.h
+++ b/direct/timothy_tests/threading/test_b.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/threading/thread_function.c b/direct/timothy_tests/threading/thread_function.c
index 52b78d0..9b75a0b 100644
--- a/direct/timothy_tests/threading/thread_function.c
+++ b/direct/timothy_tests/threading/thread_function.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/threading/thread_function.h b/direct/timothy_tests/threading/thread_function.h
index 106793f..edfed0d 100644
--- a/direct/timothy_tests/threading/thread_function.h
+++ b/direct/timothy_tests/threading/thread_function.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/timothy_tests/threading/threading.c b/direct/timothy_tests/threading/threading.c
index d4f584b..96a91f8 100644
--- a/direct/timothy_tests/threading/threading.c
+++ b/direct/timothy_tests/threading/threading.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 <timothy@yaffs.net>
diff --git a/direct/timothy_tests/threading/threading.h b/direct/timothy_tests/threading/threading.h
index 307a30c..61fcab5 100644
--- a/direct/timothy_tests/threading/threading.h
+++ b/direct/timothy_tests/threading/threading.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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>
diff --git a/direct/yaffs_attribs.c b/direct/yaffs_attribs.c
index 86e5e6e..416341a 100644
--- a/direct/yaffs_attribs.c
+++ b/direct/yaffs_attribs.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_error.c b/direct/yaffs_error.c
index 6757eec..dfdb798 100644
--- a/direct/yaffs_error.c
+++ b/direct/yaffs_error.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 <timothy@yaffs.net>
diff --git a/direct/yaffs_flashif.c b/direct/yaffs_flashif.c
index 95ac613..f7c1998 100644
--- a/direct/yaffs_flashif.c
+++ b/direct/yaffs_flashif.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_flashif.h b/direct/yaffs_flashif.h
index b169170..a7b854f 100644
--- a/direct/yaffs_flashif.h
+++ b/direct/yaffs_flashif.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_flashif2.h b/direct/yaffs_flashif2.h
index 75a66de..40e01aa 100644
--- a/direct/yaffs_flashif2.h
+++ b/direct/yaffs_flashif2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_hweight.c b/direct/yaffs_hweight.c
index d283b87..9851683 100644
--- a/direct/yaffs_hweight.c
+++ b/direct/yaffs_hweight.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -45,9 +45,9 @@ int yaffs_hweight8(u8 x)
int yaffs_hweight32(u32 x)
{
- return hweight8(x & 0xff) +
- hweight8((x >> 8) & 0xff) +
- hweight8((x >> 16) & 0xff) +
- hweight8((x >> 24) & 0xff);
+ return yaffs_hweight8(x & 0xff) +
+ yaffs_hweight8((x >> 8) & 0xff) +
+ yaffs_hweight8((x >> 16) & 0xff) +
+ yaffs_hweight8((x >> 24) & 0xff);
}
diff --git a/direct/yaffs_hweight.h b/direct/yaffs_hweight.h
index cfe38dd..58d826c 100644
--- a/direct/yaffs_hweight.h
+++ b/direct/yaffs_hweight.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_list.h b/direct/yaffs_list.h
index 6bb4646..f1c5254 100644
--- a/direct/yaffs_list.h
+++ b/direct/yaffs_list.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_nandemul2k.h b/direct/yaffs_nandemul2k.h
index 739e118..cb0c4e6 100644
--- a/direct/yaffs_nandemul2k.h
+++ b/direct/yaffs_nandemul2k.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_nandif.c b/direct/yaffs_nandif.c
index e103757..b93b55a 100644
--- a/direct/yaffs_nandif.c
+++ b/direct/yaffs_nandif.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -92,7 +92,7 @@ int ynandif_ReadChunkWithTagsFromNAND(struct yaffs_dev * dev, int nand_chunk,
if(!data) {
localData = 1;
- data = yaffs_get_temp_buffer(dev,__LINE__);
+ data = yaffs_get_temp_buffer(dev);
}
spare = NULL;
spareSize = 0;
@@ -133,7 +133,7 @@ int ynandif_ReadChunkWithTagsFromNAND(struct yaffs_dev * dev, int nand_chunk,
}
if(localData)
- yaffs_release_temp_buffer(dev,data,__LINE__);
+ yaffs_release_temp_buffer(dev, data);
return retval;
}
@@ -184,7 +184,7 @@ int ynandif_QueryNANDBlock(struct yaffs_dev *dev, int blockId,
}
else
{
- *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
*seq_number = tags.seq_number;
}
}
diff --git a/direct/yaffs_nandif.h b/direct/yaffs_nandif.h
index a130f3c..5065e7f 100644
--- a/direct/yaffs_nandif.h
+++ b/direct/yaffs_nandif.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffs_osglue.h b/direct/yaffs_osglue.h
index ab05fd4..e81c8e8 100644
--- a/direct/yaffs_osglue.h
+++ b/direct/yaffs_osglue.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -32,8 +32,8 @@ u32 yaffsfs_CurrentTime(void);
void yaffsfs_SetError(int err);
-void *yaffs_malloc(size_t size);
-void yaffs_free(void *ptr);
+void *yaffsfs_malloc(size_t size);
+void yaffsfs_free(void *ptr);
void yaffsfs_OSInitialisation(void);
diff --git a/direct/yaffscfg.h b/direct/yaffscfg.h
index 9157b82..f832033 100644
--- a/direct/yaffscfg.h
+++ b/direct/yaffscfg.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/direct/yaffsfs.c b/direct/yaffsfs.c
index e4f6df0..568fe1e 100644
--- a/direct/yaffsfs.c
+++ b/direct/yaffsfs.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -90,7 +90,7 @@ static yaffsfs_Handle yaffsfs_handle[YAFFSFS_N_HANDLES];
static int yaffsfs_handlesInitialised;
-unsigned yaffs_set_trace(unsigned tm)
+unsigned yaffs_set_trace(unsigned tm)
{
yaffs_trace_mask = tm;
return yaffs_trace_mask;
@@ -143,7 +143,7 @@ static yaffsfs_Inode *yaffsfs_HandleToInode(int handle)
{
yaffsfs_FileDes *fd = yaffsfs_HandleToFileDes(handle);
- if(fd && fd->handleCount > 0 &&
+ if(fd && fd->handleCount > 0 &&
fd->inodeId >= 0 && fd->inodeId < YAFFSFS_N_HANDLES)
return &yaffsfs_inode[fd->inodeId];
@@ -169,7 +169,7 @@ static int yaffsfs_FindInodeIdForObject(struct yaffs_obj *obj)
{
int i;
int ret = -1;
-
+
if(obj)
obj = yaffs_get_equivalent_obj(obj);
@@ -190,7 +190,7 @@ static int yaffsfs_GetInodeIdForObject(struct yaffs_obj *obj)
int i;
int ret;
yaffsfs_Inode *in = NULL;
-
+
if(obj)
obj = yaffs_get_equivalent_obj(obj);
@@ -208,8 +208,8 @@ static int yaffsfs_GetInodeIdForObject(struct yaffs_obj *obj)
in->iObj = obj;
in->count++;
}
-
-
+
+
return ret;
}
@@ -227,12 +227,12 @@ static int yaffsfs_CountHandles(struct yaffs_obj *obj)
static void yaffsfs_ReleaseInode(yaffsfs_Inode *in)
{
struct yaffs_obj *obj;
-
+
obj = in->iObj;
if(obj->unlinked)
yaffs_del_obj(obj);
-
+
obj->my_inode = NULL;
in->iObj = NULL;
@@ -247,7 +247,7 @@ static void yaffsfs_PutInode(int inodeId)
yaffsfs_ReleaseInode(in);
in->count = 0;
}
- }
+ }
}
@@ -307,7 +307,7 @@ static int yaffsfs_GetHandle(int handle)
{
yaffsfs_Handle *h = yaffsfs_HandleToPointer(handle);
- if(h && h->useCount > 0){
+ if(h && h->useCount > 0){
h->useCount++;
return 0;
}
@@ -340,7 +340,7 @@ static int yaffsfs_PutHandle(int handle)
{
yaffsfs_Handle *h = yaffsfs_HandleToPointer(handle);
- if(h && h->useCount > 0){
+ if(h && h->useCount > 0){
h->useCount--;
if(h->useCount < 1){
yaffsfs_PutFileDes(h->fdId);
@@ -366,7 +366,7 @@ static void yaffsfs_BreakDeviceHandles(struct yaffs_dev *dev)
h->fdId = 0;
}
if(fd && fd->handleCount>0 && obj && obj->my_dev == dev){
-
+
fd->handleCount = 0;
yaffsfs_PutInode(fd->inodeId);
fd->inodeId = -1;
@@ -403,10 +403,10 @@ int yaffsfs_IsPathDivider(YCHAR ch)
int yaffsfs_CheckNameLength(const char *name)
{
- int retVal = 0;
+ int retVal = 0;
int nameLength = strnlen(name,YAFFS_MAX_NAME_LENGTH+1);
-
+
if(nameLength == 0){
yaffsfs_SetError(-ENOENT);
retVal = -1;
@@ -415,7 +415,7 @@ int yaffsfs_CheckNameLength(const char *name)
retVal = -1;
}
- return retVal;
+ return retVal;
}
@@ -438,7 +438,7 @@ static int yaffsfs_alt_dir_path(const YCHAR *path, YCHAR **ret_path)
* Curveball: Need to handle multiple path dividers:
* eg. /foof/sdfse///// -> /foo/sdfse
*/
- if(path_length > 0 &&
+ if(path_length > 0 &&
yaffsfs_IsPathDivider(path[path_length-1])){
alt_path = kmalloc(path_length + 1, 0);
if(!alt_path)
@@ -546,7 +546,7 @@ static int yaffsfs_CheckPath(const YCHAR *path)
n++;
path++;
}
-
+
return (*path) ? -1 : 0;
}
@@ -659,13 +659,13 @@ static struct yaffs_obj *yaffsfs_DoFindDirectory(struct yaffs_obj *startDir,
dir = yaffsfs_FollowLink(dir,symDepth,loop);
- if(dir && dir->variant_type !=
+ if(dir && dir->variant_type !=
YAFFS_OBJECT_TYPE_DIRECTORY){
if(notDir)
*notDir = 1;
dir = NULL;
}
-
+
}
}
}
@@ -712,7 +712,7 @@ static struct yaffs_obj *yaffsfs_FindObject(struct yaffs_obj *relDir,
/*************************************************************************
- * Start of yaffsfs visible functions.
+ * Start of yaffsfs visible functions.
*************************************************************************/
int yaffs_dup(int handle)
@@ -841,7 +841,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
if( writeRequested && !(obj->yst_mode & S_IWRITE))
openDenied = 1;
- if( !errorReported && writeRequested &&
+ if( !errorReported && writeRequested &&
obj->my_dev->read_only){
openDenied = 1;
yaffsfs_SetError(-EROFS);
@@ -881,7 +881,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
- if((!sharedReadAllowed && readRequested)||
+ if((!sharedReadAllowed && readRequested)||
(!shareRead && alreadyReading) ||
(!sharedWriteAllowed && writeRequested) ||
(!shareWrite && alreadyWriting)){
@@ -936,10 +936,10 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
if(inodeId<0) {
/*
* Todo: Fix any problem if inodes run out, though that
- * can't happen if the number of inode items >= number of handles.
+ * can't happen if the number of inode items >= number of handles.
*/
}
-
+
fd->inodeId = inodeId;
fd->reading = readRequested;
fd->writing = writeRequested;
@@ -955,7 +955,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
yaffs_resize_file(obj,0);
} else {
yaffsfs_PutHandle(handle);
- if(!errorReported)
+ if(!errorReported)
yaffsfs_SetError(0); /* Problem */
handle = -1;
}
@@ -985,7 +985,7 @@ int yaffs_Dofsync(int handle,int datasync)
yaffsfs_SetError(-EBADF);
else if(obj->my_dev->read_only)
yaffsfs_SetError(-EROFS);
- else {
+ else {
yaffs_flush_file(obj,1,datasync);
retVal = 0;
}
@@ -1077,7 +1077,7 @@ int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte, int isPread, int
startPos = fd->position;
pos = startPos;
-
+
if(yaffs_get_obj_length(obj) > pos)
maxRead = yaffs_get_obj_length(obj) - pos;
else
@@ -1103,7 +1103,7 @@ int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte, int isPread, int
if(nToRead > nbyte)
nToRead = nbyte;
- /* Tricky bit...
+ /* Tricky bit...
* Need to reverify object in case the device was
* unmounted in another thread.
*/
@@ -1123,8 +1123,8 @@ int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte, int isPread, int
nbyte-=nRead;
else
nbyte = 0; /* no more to read */
-
-
+
+
if(nbyte > 0){
yaffsfs_Unlock();
yaffsfs_Lock();
@@ -1216,7 +1216,7 @@ int yaffsfs_do_write(int handle, const void *vbuf, unsigned int nbyte, int isPwr
if(nToWrite > nbyte)
nToWrite = nbyte;
- /* Tricky bit...
+ /* Tricky bit...
* Need to reverify object in case the device was
* remounted or unmounted in another thread.
*/
@@ -1373,7 +1373,7 @@ off_t yaffs_lseek(int handle, off_t offset, int whence)
fSize = yaffs_get_obj_length(obj);
if(fSize >= 0 && (fSize + offset) >= 0)
pos = fSize + offset;
- }
+ }
if(pos >= 0 && pos <= YAFFS_MAX_FILE_SIZE)
fd->position = pos;
@@ -1492,7 +1492,7 @@ int yaffs_rename(const YCHAR *oldPath, const YCHAR *newPath)
obj = yaffsfs_FindObject(NULL,oldPath,0,0,NULL,NULL,NULL);
newobj = yaffsfs_FindObject(NULL,newPath,0,0,NULL,NULL,NULL);
- /* If the object being renamed is a directory and the
+ /* If the object being renamed is a directory and the
* path ended with a "/" then the olddir == obj.
* We pass through NULL for the old name to tell the lower layers
* to use olddir as the object.
@@ -1527,7 +1527,7 @@ int yaffs_rename(const YCHAR *oldPath, const YCHAR *newPath)
/*
* It is a directory, check that it is not being renamed to
* being its own decendent.
- * Do this by tracing from the new directory back to the root,
+ * Do this by tracing from the new directory back to the root,
* checking for obj
*/
@@ -1671,6 +1671,95 @@ int yaffs_fstat(int fd, struct yaffs_stat *buf)
return retVal;
}
+static int yaffsfs_DoUtime(struct yaffs_obj *obj,const struct yaffs_utimbuf *buf)
+{
+ int retVal = -1;
+ int result;
+
+ struct yaffs_utimbuf local;
+
+ obj = yaffs_get_equivalent_obj(obj);
+
+ if(obj && obj->my_dev->read_only) {
+ yaffsfs_SetError(-EROFS);
+ return -1;
+ }
+
+
+ if(!buf){
+ local.actime = Y_CURRENT_TIME;
+ local.modtime = local.actime;
+ buf = &local;
+ }
+
+ if(obj){
+ obj->yst_atime = buf->actime;
+ obj->yst_mtime = buf->modtime;
+ obj->dirty = 1;
+ result = yaffs_flush_file(obj,0,0);
+ retVal = result == YAFFS_OK ? 0 : -1;
+ }
+
+ return retVal;
+}
+
+int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf)
+{
+ struct yaffs_obj *obj=NULL;
+ struct yaffs_obj *dir=NULL;
+ int retVal = -1;
+ int notDir = 0;
+ int loop = 0;
+
+ if(!path){
+ yaffsfs_SetError(-EFAULT);
+ return -1;
+ }
+
+ if(yaffsfs_CheckPath(path) < 0){
+ yaffsfs_SetError(-ENAMETOOLONG);
+ return -1;
+ }
+
+ yaffsfs_Lock();
+
+ obj = yaffsfs_FindObject(NULL,path,0,1,&dir,&notDir,&loop);
+
+ if(!dir && notDir)
+ yaffsfs_SetError(-ENOTDIR);
+ else if(loop)
+ yaffsfs_SetError(-ELOOP);
+ else if(!dir || !obj)
+ yaffsfs_SetError(-ENOENT);
+ else
+ retVal = yaffsfs_DoUtime(obj,buf);
+
+ yaffsfs_Unlock();
+
+ return retVal;
+
+}
+int yaffs_futime(int fd, const struct yaffs_utimbuf *buf)
+{
+ struct yaffs_obj *obj;
+
+ int retVal = -1;
+
+ yaffsfs_Lock();
+ obj = yaffsfs_HandleToObject(fd);
+
+ if(obj)
+ retVal = yaffsfs_DoUtime(obj,buf);
+ else
+ /* bad handle */
+ yaffsfs_SetError(-EBADF);
+
+ yaffsfs_Unlock();
+
+ return retVal;
+}
+
+
#ifndef CONFIG_YAFFS_WINCE
/* xattrib functions */
@@ -1702,11 +1791,11 @@ static int yaffs_do_setxattr(const YCHAR *path, const char *name,
if(follow)
obj = yaffsfs_FollowLink(obj,0,&loop);
- if(!dir && notDir)
+ if(!dir && notDir)
yaffsfs_SetError(-ENOTDIR);
- else if(loop)
+ else if(loop)
yaffsfs_SetError(-ELOOP);
- else if(!dir || !obj)
+ else if(!dir || !obj)
yaffsfs_SetError(-ENOENT);
else {
retVal = yaffs_set_xattrib(obj,name,data,size,flags);
@@ -1748,7 +1837,7 @@ int yaffs_fsetxattr(int fd, const char *name, const void *data, int size, int fl
yaffsfs_Lock();
obj = yaffsfs_HandleToObject(fd);
- if(!obj)
+ if(!obj)
yaffsfs_SetError(-EBADF);
else {
retVal = yaffs_set_xattrib(obj,name,data,size,flags);
@@ -1788,11 +1877,11 @@ static int yaffs_do_getxattr(const YCHAR *path, const char *name, void *data, in
if(follow)
obj = yaffsfs_FollowLink(obj,0,&loop);
- if(!dir && notDir)
+ if(!dir && notDir)
yaffsfs_SetError(-ENOTDIR);
- else if(loop)
+ else if(loop)
yaffsfs_SetError(-ELOOP);
- else if(!dir || !obj)
+ else if(!dir || !obj)
yaffsfs_SetError(-ENOENT);
else {
retVal = yaffs_get_xattrib(obj,name,data,size);
@@ -1872,11 +1961,11 @@ static int yaffs_do_listxattr(const YCHAR *path, char *data, int size, int follo
if(follow)
obj = yaffsfs_FollowLink(obj,0,&loop);
- if(!dir && notDir)
+ if(!dir && notDir)
yaffsfs_SetError(-ENOTDIR);
- else if(loop)
+ else if(loop)
yaffsfs_SetError(-ELOOP);
- else if(!dir || !obj)
+ else if(!dir || !obj)
yaffsfs_SetError(-ENOENT);
else {
retVal = yaffs_list_xattrib(obj, data,size);
@@ -1956,11 +2045,11 @@ static int yaffs_do_removexattr(const YCHAR *path, const char *name, int follow)
if(follow)
obj = yaffsfs_FollowLink(obj,0,&loop);
- if(!dir && notDir)
+ if(!dir && notDir)
yaffsfs_SetError(-ENOTDIR);
- else if(loop)
+ else if(loop)
yaffsfs_SetError(-ELOOP);
- else if(!dir || !obj)
+ else if(!dir || !obj)
yaffsfs_SetError(-ENOENT);
else {
retVal = yaffs_remove_xattrib(obj,name);
@@ -2045,17 +2134,17 @@ int yaffs_get_wince_times(int fd, unsigned *wctime, unsigned *watime, unsigned *
retVal = 0;
} else
/* bad handle */
- yaffsfs_SetError(-EBADF);
-
+ yaffsfs_SetError(-EBADF);
+
yaffsfs_Unlock();
-
+
return retVal;
}
-int yaffs_set_wince_times(int fd,
- const unsigned *wctime,
- const unsigned *watime,
+int yaffs_set_wince_times(int fd,
+ const unsigned *wctime,
+ const unsigned *watime,
const unsigned *wmtime)
{
struct yaffs_obj *obj;
@@ -2140,11 +2229,11 @@ int yaffs_access(const YCHAR *path, int amode)
obj = yaffsfs_FindObject(NULL,path,0,1, &dir,&notDir,&loop);
obj = yaffsfs_FollowLink(obj,0,&loop);
- if(!dir && notDir)
+ if(!dir && notDir)
yaffsfs_SetError(-ENOTDIR);
- else if(loop)
+ else if(loop)
yaffsfs_SetError(-ELOOP);
- else if(!dir || !obj)
+ else if(!dir || !obj)
yaffsfs_SetError(-ENOENT);
else if((amode & W_OK) && obj->my_dev->read_only)
yaffsfs_SetError(-EROFS);
@@ -2199,11 +2288,11 @@ int yaffs_chmod(const YCHAR *path, mode_t mode)
obj = yaffsfs_FindObject(NULL,path,0,1, &dir, &notDir,&loop);
obj = yaffsfs_FollowLink(obj,0,&loop);
- if(!dir && notDir)
+ if(!dir && notDir)
yaffsfs_SetError(-ENOTDIR);
- else if(loop)
+ else if(loop)
yaffsfs_SetError(-ELOOP);
- else if(!dir || !obj)
+ else if(!dir || !obj)
yaffsfs_SetError(-ENOENT);
else if(obj->my_dev->read_only)
yaffsfs_SetError(-EROFS);
@@ -2268,7 +2357,7 @@ int yaffs_mkdir(const YCHAR *path, mode_t mode)
}
if(alt_path)
path = alt_path;
-
+
yaffsfs_Lock();
parent = yaffsfs_FindDirectory(NULL,path,&name,0,&notDir,&loop);
if(!parent && notDir)
@@ -2398,7 +2487,7 @@ int yaffs_sync(const YCHAR *path)
yaffsfs_SetError(-ENAMETOOLONG);
return -1;
}
-
+
yaffsfs_Lock();
dev = yaffsfs_FindDevice(path,&dummy);
if(dev){
@@ -2407,17 +2496,17 @@ int yaffs_sync(const YCHAR *path)
else if(dev->read_only)
yaffsfs_SetError(-EROFS);
else {
-
+
yaffs_flush_whole_cache(dev);
yaffs_checkpoint_save(dev);
retVal = 0;
-
- }
+
+ }
}else
yaffsfs_SetError(-ENODEV);
yaffsfs_Unlock();
- return retVal;
+ return retVal;
}
@@ -2572,7 +2661,7 @@ loff_t yaffs_totalspace(const YCHAR *path)
yaffsfs_Lock();
dev = yaffsfs_FindDevice(path,&dummy);
if(dev && dev->is_mounted){
- retVal = (dev->param.end_block - dev->param.start_block + 1) -
+ retVal = (dev->param.end_block - dev->param.start_block + 1) -
dev->param.n_reserved_blocks;
retVal *= dev->param.chunks_per_block;
retVal *= dev->data_bytes_per_chunk;
@@ -2607,12 +2696,12 @@ int yaffs_inodecount(const YCHAR *path)
if(n_obj > dev->n_hardlinks)
retVal = n_obj - dev->n_hardlinks;
}
-
+
if(retVal < 0)
yaffsfs_SetError(-EINVAL);
-
+
yaffsfs_Unlock();
- return retVal;
+ return retVal;
}
@@ -2652,7 +2741,7 @@ typedef struct
struct yaffs_obj *dirObj; /* ptr to directory being searched */
struct yaffs_obj *nextReturn; /* obj to be returned by next readddir */
int offset;
- struct list_head others;
+ struct list_head others;
} yaffsfs_DirectorySearchContext;
@@ -2769,7 +2858,7 @@ yaffs_DIR *yaffs_opendir(const YCHAR *dirname)
if(!search_contexts.next)
INIT_LIST_HEAD(&search_contexts);
- list_add(&dsc->others,&search_contexts);
+ list_add(&dsc->others,&search_contexts);
yaffsfs_SetDirRewound(dsc);
}
@@ -2910,11 +2999,11 @@ int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz)
obj = yaffsfs_FindObject(NULL,path,0,1, &dir,&notDir,&loop);
- if(!dir && notDir)
+ if(!dir && notDir)
yaffsfs_SetError(-ENOTDIR);
- else if(loop)
+ else if(loop)
yaffsfs_SetError(-ELOOP);
- else if(!dir || !obj)
+ else if(!dir || !obj)
yaffsfs_SetError(-ENOENT);
else if(obj->variant_type != YAFFS_OBJECT_TYPE_SYMLINK)
yaffsfs_SetError(-EINVAL);
@@ -2971,9 +3060,9 @@ int yaffs_link(const YCHAR *oldpath, const YCHAR *linkpath)
yaffsfs_SetError(-EEXIST);
else if(lnk_dir->my_dev != obj->my_dev)
yaffsfs_SetError(-EXDEV);
- else {
+ else {
retVal = yaffsfs_CheckNameLength(newname);
-
+
if(retVal == 0) {
lnk = yaffs_link_obj(lnk_dir,newname,obj);
if(lnk)
@@ -3003,7 +3092,7 @@ int yaffs_mknod(const YCHAR *pathname, mode_t mode, dev_t dev)
/*
* D E B U G F U N C T I O N S
*/
-
+
/*
* yaffs_n_handles()
* Returns number of handles attached to the object
diff --git a/direct/yaffsfs.h b/direct/yaffsfs.h
index 29d81fc..6b6b328 100644
--- a/direct/yaffsfs.h
+++ b/direct/yaffsfs.h
@@ -1,7 +1,7 @@
/*
- * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ * YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -77,6 +77,13 @@ struct yaffs_stat{
#endif
};
+
+struct yaffs_utimbuf {
+ unsigned long actime;
+ unsigned long modtime;
+};
+
+
int yaffs_open(const YCHAR *path, int oflag, int mode) ;
int yaffs_close(int fd) ;
@@ -106,6 +113,10 @@ int yaffs_stat(const YCHAR *path, struct yaffs_stat *buf) ;
int yaffs_lstat(const YCHAR *path, struct yaffs_stat *buf) ;
int yaffs_fstat(int fd, struct yaffs_stat *buf) ;
+int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf);
+int yaffs_futime(int fd, const struct yaffs_utimbuf *buf);
+
+
int yaffs_setxattr(const char *path, const char *name, const void *data, int size, int flags);
int yaffs_lsetxattr(const char *path, const char *name, const void *data, int size, int flags);
int yaffs_fsetxattr(int fd, const char *name, const void *data, int size, int flags);
@@ -130,8 +141,8 @@ int yaffs_get_wince_times(int fd, unsigned *wctime, unsigned *watime, unsigned *
#endif
-int yaffs_chmod(const YCHAR *path, mode_t mode);
-int yaffs_fchmod(int fd, mode_t mode);
+int yaffs_chmod(const YCHAR *path, mode_t mode);
+int yaffs_fchmod(int fd, mode_t mode);
int yaffs_mkdir(const YCHAR *path, mode_t mode) ;
int yaffs_rmdir(const YCHAR *path) ;
@@ -150,10 +161,10 @@ int yaffs_remount(const YCHAR *path, int force, int read_only);
int yaffs_sync(const YCHAR *path) ;
-int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath);
-int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz);
+int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath);
+int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz);
-int yaffs_link(const YCHAR *oldpath, const YCHAR *newpath);
+int yaffs_link(const YCHAR *oldpath, const YCHAR *newpath);
int yaffs_mknod(const YCHAR *pathname, mode_t mode, dev_t dev);
loff_t yaffs_freespace(const YCHAR *path);
@@ -190,9 +201,9 @@ unsigned yaffs_get_trace(void);
/*
- * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ * YAFFS: Yet another Flash File System . 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>
diff --git a/direct/ydirectenv.h b/direct/ydirectenv.h
index 7063fa6..7860b84 100644
--- a/direct/ydirectenv.h
+++ b/direct/ydirectenv.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -29,8 +29,8 @@
#include "yaffs_hweight.h"
#include "assert.h"
-#define YBUG() assert(0)
-//#define YBUG() do { *((int *)0) =1;} while(0)
+#define BUG() assert(0)
+//#define BUG() do { *((int *)0) =1;} while(0)
#define YCHAR char
@@ -53,10 +53,10 @@ void yaffs_qsort(void *aa, size_t n, size_t es,
#define inline __inline__
#endif
-#define kmalloc(x,flags) yaffs_malloc(x)
-#define kfree(x) yaffs_free(x)
-#define vmalloc(x) yaffs_malloc(x)
-#define vfree(x) yaffs_free(x)
+#define kmalloc(x,flags) yaffsfs_malloc(x)
+#define kfree(x) yaffsfs_free(x)
+#define vmalloc(x) yaffsfs_malloc(x)
+#define vfree(x) yaffsfs_free(x)
#define cond_resched() do {} while(0)
diff --git a/direct/yportenv.h b/direct/yportenv.h
index 4208e80..0d0d0fa 100644
--- a/direct/yportenv.h
+++ b/direct/yportenv.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -24,11 +24,6 @@ typedef unsigned short u16;
typedef unsigned u32;
-#ifndef WIN32
-#include <sys/stat.h>
-#endif
-
-
#ifdef CONFIG_YAFFS_PROVIDE_DEFS
/* File types */
@@ -44,10 +39,6 @@ typedef unsigned u32;
#define DT_WHT 14
-#ifndef WIN32
-#include <sys/stat.h>
-#endif
-
/*
* Attribute flags.
* These are or-ed together to select what has been changed.
@@ -227,6 +218,22 @@ struct iattr {
#define S_IFMT 0170000
#endif
+#ifndef S_IFSOCK
+#define S_IFSOCK 0140000
+#endif
+
+#ifndef S_IFIFO
+#define S_IFIFO 0010000
+#endif
+
+#ifndef S_IFCHR
+#define S_IFCHR 0020000
+#endif
+
+#ifndef S_IFBLK
+#define S_IFBLK 0060000
+#endif
+
#ifndef S_IFLNK
#define S_IFLNK 0120000
#endif
@@ -239,6 +246,15 @@ struct iattr {
#define S_IFREG 0100000
#endif
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+
+
#ifndef S_IREAD
#define S_IREAD 0000400
#endif
@@ -278,8 +294,8 @@ struct iattr {
#define Y_DUMP_STACK() do { } while (0)
#endif
-#ifndef YBUG
-#define YBUG() do {\
+#ifndef BUG
+#define BUG() do {\
yaffs_trace(YAFFS_TRACE_BUG,\
"==>> yaffs bug: " __FILE__ " %d",\
__LINE__);\
diff --git a/linux-tests/plot_data.sh b/linux-tests/plot_data.sh
index 59c26b0..e7482bc 100755
--- a/linux-tests/plot_data.sh
+++ b/linux-tests/plot_data.sh
@@ -1,4 +1,4 @@
-\#!/bin/sh
+#!/bin/sh
# Script that gathers data erased vs free data from /proc/yaffs_stats and simultaneously \
# plots it using gnuplot.
@@ -25,9 +25,24 @@ i=0;
rm -f $log_file
while [ ! -e $done_file ] ; do
- erased_blocks=$(cat /proc/yaffs | grep n_erased_blocks | cut -d ' ' -f 2)
- free_chunks=$(cat /proc/yaffs | grep n_free_chunks | cut -d ' ' -f 2)
-
+ xx='1'
+ erased_blocks='2'
+ while [ "$xx" != "$erased_blocks" ] ; do
+ xx=$(cat /proc/yaffs | grep n_erased_blocks | cut -d ' ' -f 2)
+ erased_blocks=$(cat /proc/yaffs | grep n_erased_blocks | cut -d ' ' -f 2)
+ if [ -z "$xx" ] ; then
+ xx='bad value'
+ fi
+ done
+ xx='1'
+ free_chunks='2'
+ while [ "$xx" != "$free_chunks" ] ; do
+ xx=$(cat /proc/yaffs | grep n_free_chunks | cut -d ' ' -f 2)
+ free_chunks=$(cat /proc/yaffs | grep n_free_chunks | cut -d ' ' -f 2)
+ if [ -z "$xx" ] ; then
+ xx='bad value'
+ fi
+ done
erased_chunks=$(($erased_blocks*64))
str=" $i, 0, $free_chunks, $erased_chunks"
echo $str
diff --git a/linux-tests/xattrtest.c b/linux-tests/xattrtest.c
index d1e5cf0..4e92dfc 100644
--- a/linux-tests/xattrtest.c
+++ b/linux-tests/xattrtest.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/moduleconfig.h b/moduleconfig.h
index 83cf0c1..c5b6cf1 100644
--- a/moduleconfig.h
+++ b/moduleconfig.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Martin Fouts <Martin.Fouts@palmsource.com>
@@ -18,64 +18,10 @@
#ifdef YAFFS_OUT_OF_TREE
-/* DO NOT UNSET THESE THREE. YAFFS2 will not compile if you do. */
#define CONFIG_YAFFS_FS
-#define CONFIG_YAFFS_YAFFS1
-#define CONFIG_YAFFS_YAFFS2
+#define CONFIG_YAFFS_DEBUG
-/* These options are independent of each other. Select those that matter. */
+#endif
-/* Default: Not selected */
-/* Meaning: Yaffs does its own ECC, rather than using MTD ECC */
-/* #define CONFIG_YAFFS_DOES_ECC */
+#endif
-/* Default: Selected */
-/* Meaning: Yaffs does its own ECC on tags for packed tags rather than use mtd */
-#define CONFIG_YAFFS_DOES_TAGS_ECC
-
-/* Default: Not selected */
-/* Meaning: ECC byte order is 'wrong'. Only meaningful if */
-/* CONFIG_YAFFS_DOES_ECC is set */
-/* #define CONFIG_YAFFS_ECC_WRONG_ORDER */
-
-/* Default: Not selected */
-/* Meaning: Always test whether chunks are erased before writing to them.
- Use during mtd debugging and init. */
-/* #define CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED */
-
-/* Default: Not Selected */
-/* Meaning: At mount automatically empty all files from lost and found. */
-/* This is done to fix an old problem where rmdir was not checking for an */
-/* empty directory. This can also be achieved with a mount option. */
-#define CONFIG_YAFFS_EMPTY_LOST_AND_FOUND
-
-/* Default: Unselected */
-/* Meaning: Select to disable block refreshing. */
-/* Block Refreshing periodically rewrites the oldest block. */
-/* #define CONFIG_DISABLE_BLOCK_REFRESHING */
-
-/* Default: Unselected */
-/* Meaning: Select to disable background processing */
-/* #define CONFIG_DISABLE_BACKGROUND */
-
-/* Default: Selected */
-/* Meaning: Enable XATTR support */
-#define CONFIG_YAFFS_XATTR
-
-/*
-Older-style on-NAND data format has a "page_status" byte to record
-chunk/page state. This byte is zeroed when the page is discarded.
-Choose this option if you have existing on-NAND data in this format
-that you need to continue to support. New data written also uses the
-older-style format.
-Note: Use of this option generally requires that MTD's oob layout be
-adjusted to use the older-style format. See notes on tags formats and
-MTD versions in yaffs_mtdif1.c.
-*/
-/* Default: Not selected */
-/* Meaning: Use older-style on-NAND data format with page_status byte */
-/* #define CONFIG_YAFFS_9BYTE_TAGS */
-
-#endif /* YAFFS_OUT_OF_TREE */
-
-#endif /* __YAFFS_CONFIG_H__ */
diff --git a/mtdemul/nandemul2k.c b/mtdemul/nandemul2k.c
index 4cba57b..d1028ff 100644
--- a/mtdemul/nandemul2k.c
+++ b/mtdemul/nandemul2k.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/patch-ker.sh b/patch-ker.sh
index ba6b6e4..ed54d53 100755
--- a/patch-ker.sh
+++ b/patch-ker.sh
@@ -57,11 +57,13 @@ if [ $MULTIORSINGLE = m ]; then
MTD1_CODE="yaffs_mtdif1_multi.c"
MTD2_CODE="yaffs_mtdif2_multi.c"
YPORTENV="yportenv_multi.h"
+ KCONFIG_SRC="Kconfig_multi"
elif [ $MULTIORSINGLE = s ]; then
VFS_CODE="yaffs_vfs_single.c"
MTD1_CODE="yaffs_mtdif1_single.c"
MTD2_CODE="yaffs_mtdif2_single.c"
YPORTENV="yportenv_single.h"
+ KCONFIG_SRC="Kconfig_single"
echo ""
echo "*** Warning ***"
@@ -90,7 +92,7 @@ PATCHLEVEL=`grep -s PATCHLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'PATCHLEV
SUBLEVEL=`grep -s SUBLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'SUBLEVEL = '//`
# Can we handle this version?
-if [ $VERSION -ne 2 -o $PATCHLEVEL -lt 6 ]
+if [ $VERSION$PATCHLEVEL -lt 26 ]
then
echo "Cannot patch kernel version $VERSION.$PATCHLEVEL.$SUBLEVEL, must be 2.6.x or higher"
exit 1;
@@ -142,10 +144,10 @@ then
echo "already there then delete $YAFFSDIR and re-run this script"
echo " eg. \"rm -rf $YAFFSDIR\" "
else
- rm yaffs*.mod.c
+ rm yaffs*.mod.c 2> /dev/null
mkdir $LINUXDIR/fs/yaffs2
$CPY $PWD/Makefile.kernel $LINUXDIR/fs/yaffs2/Makefile
- $CPY $PWD/Kconfig $LINUXDIR/fs/yaffs2
+ $CPY $PWD/$KCONFIG_SRC $LINUXDIR/fs/yaffs2/Kconfig
$CPY $PWD/*.c $PWD/*.h $LINUXDIR/fs/yaffs2
rm $LINUXDIR/fs/yaffs2/yaffs_vfs*.c $LINUXDIR/fs/yaffs2/yaffs_mtdif[12]*.c
rm $LINUXDIR/fs/yaffs2/yportenv*.h
diff --git a/patches/yaffs_linux_allocator.c b/patches/yaffs_linux_allocator.c
index 395f4ea..9cbb589 100644
--- a/patches/yaffs_linux_allocator.c
+++ b/patches/yaffs_linux_allocator.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -55,7 +55,7 @@ void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
} else {
T(YAFFS_TRACE_ALWAYS,
(TSTR("NULL tnode cache\n")));
- YBUG();
+ BUG();
}
if(allocator->object_cache){
@@ -64,7 +64,7 @@ void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
} else {
T(YAFFS_TRACE_ALWAYS,
(TSTR("NULL object cache\n")));
- YBUG();
+ BUG();
}
kfree(allocator);
@@ -72,7 +72,7 @@ void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
} else {
T(YAFFS_TRACE_ALWAYS,
(TSTR("Deinitialising NULL allocator\n")));
- YBUG();
+ BUG();
}
dev->allocator = NULL;
}
@@ -110,7 +110,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
T(YAFFS_TRACE_ALLOCATE,(TSTR("Initialising yaffs allocator\n")));
if(dev->allocator)
- YBUG();
+ BUG();
else if(mount_id >= 10){
T(YAFFS_TRACE_ALWAYS,(TSTR("Bad mount_id %u\n"),mount_id));
} else {
@@ -121,7 +121,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
if(!dev->allocator){
T(YAFFS_TRACE_ALWAYS,
(TSTR("yaffs allocator creation failed\n")));
- YBUG();
+ BUG();
return;
}
@@ -141,7 +141,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
else {
T(YAFFS_TRACE_ALWAYS,
(TSTR("yaffs cache creation failed\n")));
- YBUG();
+ BUG();
}
@@ -159,7 +159,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
else {
T(YAFFS_TRACE_ALWAYS,
(TSTR("yaffs cache creation failed\n")));
- YBUG();
+ BUG();
}
}
}
@@ -169,7 +169,7 @@ struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev *dev)
{
yaffs_Allocator *allocator = dev->allocator;
if(!allocator || !allocator->tnode_cache){
- YBUG();
+ BUG();
return NULL;
}
return kmem_cache_alloc(allocator->tnode_cache, GFP_NOFS);
@@ -185,11 +185,11 @@ struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev *dev)
{
yaffs_Allocator *allocator = dev->allocator;
if(!allocator){
- YBUG();
+ BUG();
return NULL;
}
if(!allocator->object_cache){
- YBUG();
+ BUG();
return NULL;
}
return kmem_cache_alloc(allocator->object_cache, GFP_NOFS);
diff --git a/patches/yaffs_mtdif2.c b/patches/yaffs_mtdif2.c
index 19677ad..3547452 100644
--- a/patches/yaffs_mtdif2.c
+++ b/patches/yaffs_mtdif2.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 Charles Manning <charles@aleph1.co.uk>
@@ -48,7 +48,7 @@ void nandmtd2_pt2buf(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
if (n == 0) {
T(YAFFS_TRACE_ERROR, (TSTR("No OOB space for tags" TENDSTR)));
- YBUG();
+ BUG();
}
for (i = 0; i < sizeof(yaffs_PackedTags2); i++) {
@@ -58,7 +58,7 @@ void nandmtd2_pt2buf(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
n = mtd->oobinfo.oobfree[j][1];
if (n == 0) {
T(YAFFS_TRACE_ERROR, (TSTR("No OOB space for tags" TENDSTR)));
- YBUG();
+ BUG();
}
}
dev->spareBuffer[k] = ptab[i];
@@ -86,7 +86,7 @@ void nandmtd2_buf2pt(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
if (n == 0) {
T(YAFFS_TRACE_ERROR, (TSTR("No space in OOB for tags" TENDSTR)));
- YBUG();
+ BUG();
}
for (i = 0; i < sizeof(yaffs_PackedTags2); i++) {
@@ -96,7 +96,7 @@ void nandmtd2_buf2pt(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
n = mtd->oobinfo.oobfree[j][1];
if (n == 0) {
T(YAFFS_TRACE_ERROR, (TSTR("No space in OOB for tags" TENDSTR)));
- YBUG();
+ BUG();
}
}
ptab[i] = dev->spareBuffer[k];
@@ -140,7 +140,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(struct yaffs_dev * dev, int nand_chunk,
T(YAFFS_TRACE_ALWAYS,
(TSTR
("Write chunk with null tags or data!" TENDSTR)));
- YBUG();
+ BUG();
}
if (retval == 0)
diff --git a/utils/Makefile b/utils/Makefile
index 49bf03b..710ebbf 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -16,7 +16,7 @@
#KERNELDIR = /usr/src/kernel-headers-2.4.18
-CFLAGS = -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL
+CFLAGS = -O2 -Wall -DCONFIG_YAFFS_UTIL
CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
CFLAGS+= -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
@@ -25,30 +25,43 @@ MAKETOOLS =
CC=$(MAKETOOLS)gcc
-COMMONLINKS = yaffs_ecc.c
-COMMONOBJS = $(COMMONLINKS:.c=.o)
+COMMON_BASE_C_LINKS = yaffs_ecc.c
+COMMON_BASE_LINKS = $(COMMON_BASE_C_LINKS) yaffs_ecc.h yaffs_guts.h yaffs_packedtags2.h yaffs_trace.h
+COMMON_DIRECT_C_LINKS = yaffs_hweight.c
+COMMON_C_LINKS = $(COMMON_DIRECT_C_LINKS) $(COMMON_BASE_C_LINKS)
+COMMON_DIRECT_LINKS= $(COMMON_DIRECT_C_LINKS) yportenv.h yaffs_hweight.h yaffs_list.h
+COMMONOBJS = $(COMMON_C_LINKS:.c=.o)
MKYAFFSSOURCES = mkyaffsimage.c
MKYAFFSIMAGEOBJS = $(MKYAFFSSOURCES:.c=.o)
MKYAFFS2SOURCES = mkyaffs2image.c
-MKYAFFS2LINKS = yaffs_packedtags2.c yaffs_tagsvalidity.c
+MKYAFFS2LINKS = yaffs_packedtags2.c
MKYAFFS2IMAGEOBJS = $(MKYAFFS2SOURCES:.c=.o) $(MKYAFFS2LINKS:.c=.o)
+BASE_LINKS = $(MKYAFFSLINKS) $(MKYAFFS2LINKS) $(COMMON_BASE_LINKS)
+DIRECT_LINKS = $(MKYAFFS_DIRECT_LINKS) $(MKYAFFS2_DIRECT_LINKS) $(COMMON_DIRECT_LINKS)
+ALL_LINKS = $(BASE_LINKS) $(DIRECT_LINKS)
+
all: mkyaffsimage mkyaffs2image
-$(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS):
+$(BASE_LINKS):
ln -s ../$@ $@
+$(DIRECT_LINKS):
+ ln -s ../direct/$@ $@
+
+$(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) : $(ALL_LINKS)
+
$(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) : %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
-mkyaffsimage: $(COMMONOBJS) $(MKYAFFSIMAGEOBJS)
- $(CC) -o $@ $(COMMONOBJS) $(MKYAFFSIMAGEOBJS)
+mkyaffsimage: $(MKYAFFSIMAGEOBJS) $(COMMONOBJS)
+ $(CC) -o $@ $^
-mkyaffs2image: $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS)
- $(CC) -o $@ $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS)
+mkyaffs2image: $(MKYAFFS2IMAGEOBJS) $(COMMONOBJS)
+ $(CC) -o $@ $^
clean:
- rm -f $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) $(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS) mkyaffsimage mkyaffs2image core
+ rm -f $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) $(ALL_LINKS) mkyaffsimage mkyaffs2image core
diff --git a/utils/mkyaffs2image.c b/utils/mkyaffs2image.c
index fa2229b..5292b66 100644
--- a/utils/mkyaffs2image.c
+++ b/utils/mkyaffs2image.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -34,7 +34,6 @@
#include "yaffs_ecc.h"
#include "yaffs_guts.h"
-#include "yaffs_tagsvalidity.h"
#include "yaffs_packedtags2.h"
unsigned yaffs_trace_mask=0;
@@ -188,7 +187,7 @@ static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
if (write(outFile,data,chunkSize) != chunkSize)
fatal("write");
- yaffs_init_tags(&t);
+ memset(&t, 0, sizeof(t));
t.chunk_id = chunk_id;
// t.serial_number = 0;
@@ -230,52 +229,41 @@ static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
// This one is easier, since the types are more standard. No funky shifts here.
static void object_header_little_to_big_endian(struct yaffs_obj_hdr* oh)
{
- int i;
oh->type = SWAP32(oh->type); // GCC makes enums 32 bits.
oh->parent_obj_id = SWAP32(oh->parent_obj_id); // int
oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // u16 - Not used, but done for completeness.
// name = skip. Char array. Not swapped.
oh->yst_mode = SWAP32(oh->yst_mode);
-#ifdef CONFIG_YAFFS_WINCE // WinCE doesn't implement this, but we need to just in case.
- // In fact, WinCE would be *THE* place where this would be an issue.
- // Why? WINCE is little-endian only.
- {
- int n = sizeof(oh->not_for_wince)/sizeof(oh->not_for_wince[0]);
- for(i = 0; i < n; i++)
- oh->not_for_wince[i] = SWAP32(oh->not_for_wince[i]);
- }
-#else
// Regular POSIX.
oh->yst_uid = SWAP32(oh->yst_uid);
oh->yst_gid = SWAP32(oh->yst_gid);
oh->yst_atime = SWAP32(oh->yst_atime);
oh->yst_mtime = SWAP32(oh->yst_mtime);
oh->yst_ctime = SWAP32(oh->yst_ctime);
-#endif
oh->file_size = SWAP32(oh->file_size); // Aiee. An int... signed, at that!
oh->equiv_id = SWAP32(oh->equiv_id);
// alias - char array.
oh->yst_rdev = SWAP32(oh->yst_rdev);
-#ifdef CONFIG_YAFFS_WINCE
oh->win_ctime[0] = SWAP32(oh->win_ctime[0]);
oh->win_ctime[1] = SWAP32(oh->win_ctime[1]);
oh->win_atime[0] = SWAP32(oh->win_atime[0]);
oh->win_atime[1] = SWAP32(oh->win_atime[1]);
oh->win_mtime[0] = SWAP32(oh->win_mtime[0]);
oh->win_mtime[1] = SWAP32(oh->win_mtime[1]);
-#else
- {
- int n = sizeof(oh->room_to_grow)/sizeof(oh->room_to_grow[0]);
- for(i=0; i < n; i++)
- oh->room_to_grow[i] = SWAP32(oh->room_to_grow[i]);
- }
-#endif
+ oh->reserved[0] = SWAP32(oh->reserved[0]);
+ oh->reserved[1] = SWAP32(oh->reserved[1]);
+
+ oh->inband_shadowed_obj_id = SWAP32(oh->inband_shadowed_obj_id);
+ oh->inband_is_shrink = SWAP32(oh->inband_is_shrink);
+ oh->shadows_obj = SWAP32(oh->shadows_obj);
+ oh->is_shrink = SWAP32(oh->is_shrink);
}
+
static int write_object_header(int id, enum yaffs_obj_type t, struct stat *s, int parent, const char *name, int equivalentObj, const char * alias)
{
u8 bytes[chunkSize];
diff --git a/utils/mkyaffsimage.c b/utils/mkyaffsimage.c
index 02ad521..5dbe51a 100644
--- a/utils/mkyaffsimage.c
+++ b/utils/mkyaffsimage.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -132,8 +132,8 @@ static u16 yaffs_calc_name_sum(const char *name)
static void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
{
- yaffs_ecc_cacl(data , spare->ecc1);
- yaffs_ecc_cacl(&data[256] , spare->ecc2);
+ yaffs_ecc_calc(data , spare->ecc1);
+ yaffs_ecc_calc(&data[256] , spare->ecc2);
}
static void yaffs_calc_tags_ecc(struct yaffs_tags *tags)
@@ -275,54 +275,33 @@ static void object_header_little_to_big_endian(struct yaffs_obj_hdr* oh)
oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // u16 - Not used, but done for completeness.
// name = skip. Char array. Not swapped.
oh->yst_mode = SWAP32(oh->yst_mode);
-#ifdef CONFIG_YAFFS_WINCE // WinCE doesn't implement this, but we need to just in case.
- // In fact, WinCE would be *THE* place where this would be an issue!
- oh->not_for_wince[0] = SWAP32(oh->not_for_wince[0]);
- oh->not_for_wince[1] = SWAP32(oh->not_for_wince[1]);
- oh->not_for_wince[2] = SWAP32(oh->not_for_wince[2]);
- oh->not_for_wince[3] = SWAP32(oh->not_for_wince[3]);
- oh->not_for_wince[4] = SWAP32(oh->not_for_wince[4]);
-#else
+
// Regular POSIX.
oh->yst_uid = SWAP32(oh->yst_uid);
oh->yst_gid = SWAP32(oh->yst_gid);
oh->yst_atime = SWAP32(oh->yst_atime);
oh->yst_mtime = SWAP32(oh->yst_mtime);
oh->yst_ctime = SWAP32(oh->yst_ctime);
-#endif
oh->file_size = SWAP32(oh->file_size); // Aiee. An int... signed, at that!
oh->equiv_id = SWAP32(oh->equiv_id);
// alias - char array.
oh->yst_rdev = SWAP32(oh->yst_rdev);
-#ifdef CONFIG_YAFFS_WINCE
oh->win_ctime[0] = SWAP32(oh->win_ctime[0]);
oh->win_ctime[1] = SWAP32(oh->win_ctime[1]);
oh->win_atime[0] = SWAP32(oh->win_atime[0]);
oh->win_atime[1] = SWAP32(oh->win_atime[1]);
oh->win_mtime[0] = SWAP32(oh->win_mtime[0]);
oh->win_mtime[1] = SWAP32(oh->win_mtime[1]);
- oh->room_to_grow[0] = SWAP32(oh->room_to_grow[0]);
- oh->room_to_grow[1] = SWAP32(oh->room_to_grow[1]);
- oh->room_to_grow[2] = SWAP32(oh->room_to_grow[2]);
- oh->room_to_grow[3] = SWAP32(oh->room_to_grow[3]);
- oh->room_to_grow[4] = SWAP32(oh->room_to_grow[4]);
- oh->room_to_grow[5] = SWAP32(oh->room_to_grow[5]);
-#else
- oh->room_to_grow[0] = SWAP32(oh->room_to_grow[0]);
- oh->room_to_grow[1] = SWAP32(oh->room_to_grow[1]);
- oh->room_to_grow[2] = SWAP32(oh->room_to_grow[2]);
- oh->room_to_grow[3] = SWAP32(oh->room_to_grow[3]);
- oh->room_to_grow[4] = SWAP32(oh->room_to_grow[4]);
- oh->room_to_grow[5] = SWAP32(oh->room_to_grow[5]);
- oh->room_to_grow[6] = SWAP32(oh->room_to_grow[6]);
- oh->room_to_grow[7] = SWAP32(oh->room_to_grow[7]);
- oh->room_to_grow[8] = SWAP32(oh->room_to_grow[8]);
- oh->room_to_grow[9] = SWAP32(oh->room_to_grow[9]);
- oh->room_to_grow[10] = SWAP32(oh->room_to_grow[10]);
- oh->room_to_grow[11] = SWAP32(oh->room_to_grow[11]);
-#endif
+
+ oh->reserved[0] = SWAP32(oh->reserved[0]);
+ oh->reserved[1] = SWAP32(oh->reserved[1]);
+
+ oh->inband_shadowed_obj_id = SWAP32(oh->inband_shadowed_obj_id);
+ oh->inband_is_shrink = SWAP32(oh->inband_is_shrink);
+ oh->shadows_obj = SWAP32(oh->shadows_obj);
+ oh->is_shrink = SWAP32(oh->is_shrink);
}
static int write_object_header(int obj_id, enum yaffs_obj_type t, struct stat *s, int parent, const char *name, int equivalentObj, const char * alias)
diff --git a/yaffs_tagsvalidity.h b/utils/yutilsenv.h
index 36a021f..487573f 100644
--- a/yaffs_tagsvalidity.h
+++ b/utils/yutilsenv.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -13,11 +13,20 @@
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*/
-#ifndef __YAFFS_TAGS_VALIDITY_H__
-#define __YAFFS_TAGS_VALIDITY_H__
-#include "yaffs_guts.h"
+#ifndef __YAFFS_UTILSENV_H__
+#define __YAFFS_UTILSENV_H__
-void yaffs_init_tags(struct yaffs_ext_tags *tags);
-int yaffs_validate_tags(struct yaffs_ext_tags *tags);
+#define YCHAR char
+#define YUCHAR unsigned char
+
+#include <sys/types.h>
+#include <string.h>
+#include "yaffs_list.h"
+#include "yaffs_hweight.h"
+
+#define hweight8(x) yaffs_hweight8(x)
+#define hweight32(x) yaffs_hweight32(x)
+
+#define yaffs_trace(...) do {} while (0)
#endif
diff --git a/yaffs_allocator.c b/yaffs_allocator.c
index f9cd5be..c8f2861 100644
--- a/yaffs_allocator.c
+++ b/yaffs_allocator.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -16,53 +16,19 @@
#include "yaffs_trace.h"
#include "yportenv.h"
-#ifdef CONFIG_YAFFS_KMALLOC_ALLOCATOR
-
-void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
-{
- dev = dev;
-}
-
-void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
-{
- dev = dev;
-}
-
-struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev *dev)
-{
- return (struct yaffs_tnode *)kmalloc(dev->tnode_size, GFP_NOFS);
-}
-
-void yaffs_free_raw_tnode(struct yaffs_dev *dev, struct yaffs_tnode *tn)
-{
- dev = dev;
- kfree(tn);
-}
-
-void yaffs_init_raw_objs(struct yaffs_dev *dev)
-{
- dev = dev;
-}
-
-void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
-{
- dev = dev;
-}
-
-struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev *dev)
-{
- dev = dev;
- return (struct yaffs_obj *)kmalloc(sizeof(struct yaffs_obj));
-}
-
-void yaffs_free_raw_obj(struct yaffs_dev *dev, struct yaffs_obj *obj)
-{
-
- dev = dev;
- kfree(obj);
-}
-
-#else
+/*
+ * Each entry in yaffs_tnode_list and yaffs_obj_list hold blocks
+ * of approx 100 objects that are themn allocated singly.
+ * This is basically a simplified slab allocator.
+ *
+ * We don't use the Linux slab allocator because slab does not allow
+ * us to dump all the objects in one hit when we do a umount and tear
+ * down all the tnodes and objects. slab requires that we first free
+ * the individual objects.
+ *
+ * Once yaffs has been mainlined I shall try to motivate for a change
+ * to slab to provide the extra features we need here.
+ */
struct yaffs_tnode_list {
struct yaffs_tnode_list *next;
@@ -81,7 +47,7 @@ struct yaffs_allocator {
struct yaffs_tnode_list *alloc_tnode_list;
int n_obj_created;
- struct yaffs_obj *free_objs;
+ struct list_head free_objs;
int n_free_objects;
struct yaffs_obj_list *allocated_obj_list;
@@ -89,14 +55,12 @@ struct yaffs_allocator {
static void yaffs_deinit_raw_tnodes(struct yaffs_dev *dev)
{
-
struct yaffs_allocator *allocator =
(struct yaffs_allocator *)dev->allocator;
-
struct yaffs_tnode_list *tmp;
if (!allocator) {
- YBUG();
+ BUG();
return;
}
@@ -106,7 +70,6 @@ static void yaffs_deinit_raw_tnodes(struct yaffs_dev *dev)
kfree(allocator->alloc_tnode_list->tnodes);
kfree(allocator->alloc_tnode_list);
allocator->alloc_tnode_list = tmp;
-
}
allocator->free_tnodes = NULL;
@@ -118,14 +81,15 @@ static void yaffs_init_raw_tnodes(struct yaffs_dev *dev)
{
struct yaffs_allocator *allocator = dev->allocator;
- if (allocator) {
- allocator->alloc_tnode_list = NULL;
- allocator->free_tnodes = NULL;
- allocator->n_free_tnodes = 0;
- allocator->n_tnodes_created = 0;
- } else {
- YBUG();
+ if (!allocator) {
+ BUG();
+ return;
}
+
+ allocator->alloc_tnode_list = NULL;
+ allocator->free_tnodes = NULL;
+ allocator->n_free_tnodes = 0;
+ allocator->n_tnodes_created = 0;
}
static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
@@ -140,7 +104,7 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
struct yaffs_tnode_list *tnl;
if (!allocator) {
- YBUG();
+ BUG();
return YAFFS_FAIL;
}
@@ -148,7 +112,6 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
return YAFFS_OK;
/* make these things */
-
new_tnodes = kmalloc(n_tnodes * dev->tnode_size, GFP_NOFS);
mem = (u8 *) new_tnodes;
@@ -176,7 +139,6 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
* NB If we can't add this to the management list it isn't fatal
* but it just means we can't free this bunch of tnodes later.
*/
-
tnl = kmalloc(sizeof(struct yaffs_tnode_list), GFP_NOFS);
if (!tnl) {
yaffs_trace(YAFFS_TRACE_ERROR,
@@ -188,7 +150,7 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
allocator->alloc_tnode_list = tnl;
}
- yaffs_trace(YAFFS_TRACE_ALLOCATE,"Tnodes added");
+ yaffs_trace(YAFFS_TRACE_ALLOCATE, "Tnodes added");
return YAFFS_OK;
}
@@ -200,7 +162,7 @@ struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev *dev)
struct yaffs_tnode *tn = NULL;
if (!allocator) {
- YBUG();
+ BUG();
return NULL;
}
@@ -223,7 +185,7 @@ void yaffs_free_raw_tnode(struct yaffs_dev *dev, struct yaffs_tnode *tn)
struct yaffs_allocator *allocator = dev->allocator;
if (!allocator) {
- YBUG();
+ BUG();
return;
}
@@ -235,17 +197,24 @@ void yaffs_free_raw_tnode(struct yaffs_dev *dev, struct yaffs_tnode *tn)
dev->checkpoint_blocks_required = 0; /* force recalculation */
}
+/*--------------- yaffs_obj alloaction ------------------------
+ *
+ * Free yaffs_objs are stored in a list using obj->siblings.
+ * The blocks of allocated objects are stored in a linked list.
+ */
+
static void yaffs_init_raw_objs(struct yaffs_dev *dev)
{
struct yaffs_allocator *allocator = dev->allocator;
- if (allocator) {
- allocator->allocated_obj_list = NULL;
- allocator->free_objs = NULL;
- allocator->n_free_objects = 0;
- } else {
- YBUG();
+ if (!allocator) {
+ BUG();
+ return;
}
+
+ allocator->allocated_obj_list = NULL;
+ INIT_LIST_HEAD(&allocator->free_objs);
+ allocator->n_free_objects = 0;
}
static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
@@ -254,7 +223,7 @@ static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
struct yaffs_obj_list *tmp;
if (!allocator) {
- YBUG();
+ BUG();
return;
}
@@ -262,11 +231,10 @@ static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
tmp = allocator->allocated_obj_list->next;
kfree(allocator->allocated_obj_list->objects);
kfree(allocator->allocated_obj_list);
-
allocator->allocated_obj_list = tmp;
}
- allocator->free_objs = NULL;
+ INIT_LIST_HEAD(&allocator->free_objs);
allocator->n_free_objects = 0;
allocator->n_obj_created = 0;
}
@@ -274,13 +242,12 @@ static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
static int yaffs_create_free_objs(struct yaffs_dev *dev, int n_obj)
{
struct yaffs_allocator *allocator = dev->allocator;
-
int i;
struct yaffs_obj *new_objs;
struct yaffs_obj_list *list;
if (!allocator) {
- YBUG();
+ BUG();
return YAFFS_FAIL;
}
@@ -292,27 +259,19 @@ static int yaffs_create_free_objs(struct yaffs_dev *dev, int n_obj)
list = kmalloc(sizeof(struct yaffs_obj_list), GFP_NOFS);
if (!new_objs || !list) {
- if (new_objs) {
- kfree(new_objs);
- new_objs = NULL;
- }
- if (list) {
- kfree(list);
- list = NULL;
- }
+ kfree(new_objs);
+ new_objs = NULL;
+ kfree(list);
+ list = NULL;
yaffs_trace(YAFFS_TRACE_ALLOCATE,
"Could not allocate more objects");
return YAFFS_FAIL;
}
/* Hook them into the free list */
- for (i = 0; i < n_obj - 1; i++) {
- new_objs[i].siblings.next =
- (struct list_head *)(&new_objs[i + 1]);
- }
+ for (i = 0; i < n_obj; i++)
+ list_add(&new_objs[i].siblings, &allocator->free_objs);
- new_objs[n_obj - 1].siblings.next = (void *)allocator->free_objs;
- allocator->free_objs = new_objs;
allocator->n_free_objects += n_obj;
allocator->n_obj_created += n_obj;
@@ -328,21 +287,22 @@ static int yaffs_create_free_objs(struct yaffs_dev *dev, int n_obj)
struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev *dev)
{
struct yaffs_obj *obj = NULL;
+ struct list_head *lh;
struct yaffs_allocator *allocator = dev->allocator;
if (!allocator) {
- YBUG();
+ BUG();
return obj;
}
/* If there are none left make more */
- if (!allocator->free_objs)
+ if (list_empty(&allocator->free_objs))
yaffs_create_free_objs(dev, YAFFS_ALLOCATION_NOBJECTS);
- if (allocator->free_objs) {
- obj = allocator->free_objs;
- allocator->free_objs =
- (struct yaffs_obj *)(allocator->free_objs->siblings.next);
+ if (!list_empty(&allocator->free_objs)) {
+ lh = allocator->free_objs.next;
+ obj = list_entry(lh, struct yaffs_obj, siblings);
+ list_del_init(lh);
allocator->n_free_objects--;
}
@@ -354,43 +314,44 @@ void yaffs_free_raw_obj(struct yaffs_dev *dev, struct yaffs_obj *obj)
struct yaffs_allocator *allocator = dev->allocator;
- if (!allocator)
- YBUG();
- else {
- /* Link into the free list. */
- obj->siblings.next = (struct list_head *)(allocator->free_objs);
- allocator->free_objs = obj;
- allocator->n_free_objects++;
+ if (!allocator) {
+ BUG();
+ return;
}
+
+ /* Link into the free list. */
+ list_add(&obj->siblings, &allocator->free_objs);
+ allocator->n_free_objects++;
}
void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
{
- if (dev->allocator) {
- yaffs_deinit_raw_tnodes(dev);
- yaffs_deinit_raw_objs(dev);
- kfree(dev->allocator);
- dev->allocator = NULL;
- } else {
- YBUG();
+ if (!dev->allocator) {
+ BUG();
+ return;
}
+
+ yaffs_deinit_raw_tnodes(dev);
+ yaffs_deinit_raw_objs(dev);
+ kfree(dev->allocator);
+ dev->allocator = NULL;
}
void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
{
struct yaffs_allocator *allocator;
- if (!dev->allocator) {
- allocator = kmalloc(sizeof(struct yaffs_allocator), GFP_NOFS);
- if (allocator) {
- dev->allocator = allocator;
- yaffs_init_raw_tnodes(dev);
- yaffs_init_raw_objs(dev);
- }
- } else {
- YBUG();
+ if (dev->allocator) {
+ BUG();
+ return;
+ }
+
+ allocator = kmalloc(sizeof(struct yaffs_allocator), GFP_NOFS);
+ if (allocator) {
+ dev->allocator = allocator;
+ yaffs_init_raw_tnodes(dev);
+ yaffs_init_raw_objs(dev);
}
}
-#endif
diff --git a/yaffs_allocator.h b/yaffs_allocator.h
index 4d5f2ae..a8cc322 100644
--- a/yaffs_allocator.h
+++ b/yaffs_allocator.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_attribs.c b/yaffs_attribs.c
index 9b47d37..fe914e5 100644
--- a/yaffs_attribs.c
+++ b/yaffs_attribs.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_attribs.h b/yaffs_attribs.h
index 33d541d..5b21b08 100644
--- a/yaffs_attribs.h
+++ b/yaffs_attribs.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_bitmap.c b/yaffs_bitmap.c
index 7df42cd..4440e93 100644
--- a/yaffs_bitmap.c
+++ b/yaffs_bitmap.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -23,7 +23,7 @@ static inline u8 *yaffs_block_bits(struct yaffs_dev *dev, int blk)
yaffs_trace(YAFFS_TRACE_ERROR,
"BlockBits block %d is not valid",
blk);
- YBUG();
+ BUG();
}
return dev->chunk_bits +
(dev->chunk_bit_stride * (blk - dev->internal_start_block));
@@ -36,7 +36,7 @@ void yaffs_verify_chunk_bit_id(struct yaffs_dev *dev, int blk, int chunk)
yaffs_trace(YAFFS_TRACE_ERROR,
"Chunk Id (%d:%d) invalid",
blk, chunk);
- YBUG();
+ BUG();
}
}
@@ -52,7 +52,6 @@ void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
u8 *blk_bits = yaffs_block_bits(dev, blk);
yaffs_verify_chunk_bit_id(dev, blk, chunk);
-
blk_bits[chunk / 8] &= ~(1 << (chunk & 7));
}
@@ -61,15 +60,14 @@ void yaffs_set_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
u8 *blk_bits = yaffs_block_bits(dev, blk);
yaffs_verify_chunk_bit_id(dev, blk, chunk);
-
blk_bits[chunk / 8] |= (1 << (chunk & 7));
}
int yaffs_check_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
{
u8 *blk_bits = yaffs_block_bits(dev, blk);
- yaffs_verify_chunk_bit_id(dev, blk, chunk);
+ yaffs_verify_chunk_bit_id(dev, blk, chunk);
return (blk_bits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0;
}
@@ -77,6 +75,7 @@ int yaffs_still_some_chunks(struct yaffs_dev *dev, int blk)
{
u8 *blk_bits = yaffs_block_bits(dev, blk);
int i;
+
for (i = 0; i < dev->chunk_bit_stride; i++) {
if (*blk_bits)
return 1;
diff --git a/yaffs_bitmap.h b/yaffs_bitmap.h
index cf9ea58..e26b37d 100644
--- a/yaffs_bitmap.h
+++ b/yaffs_bitmap.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_checkptrw.c b/yaffs_checkptrw.c
index 4e40f43..997a618 100644
--- a/yaffs_checkptrw.c
+++ b/yaffs_checkptrw.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -44,7 +44,7 @@ static int yaffs_checkpt_erase(struct yaffs_dev *dev)
if (dev->param.
erase_fn(dev,
- i - dev->block_offset /* realign */ )) {
+ i - dev->block_offset /* realign */)) {
bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
dev->n_erased_blocks++;
dev->n_free_chunks +=
@@ -65,6 +65,7 @@ static void yaffs2_checkpt_find_erased_block(struct yaffs_dev *dev)
{
int i;
int blocks_avail = dev->n_erased_blocks - dev->param.n_reserved_blocks;
+
yaffs_trace(YAFFS_TRACE_CHECKPOINT,
"allocating checkpt block: erased %d reserved %d avail %d next %d ",
dev->n_erased_blocks, dev->param.n_reserved_blocks,
@@ -136,6 +137,7 @@ static void yaffs2_checkpt_find_block(struct yaffs_dev *dev)
int yaffs2_checkpt_open(struct yaffs_dev *dev, int writing)
{
+ int i;
dev->checkpt_open_write = writing;
@@ -167,32 +169,32 @@ int yaffs2_checkpt_open(struct yaffs_dev *dev, int writing)
memset(dev->checkpt_buffer, 0, dev->data_bytes_per_chunk);
dev->checkpt_byte_offs = 0;
return yaffs_checkpt_erase(dev);
- } else {
- int i;
- /* Set to a value that will kick off a read */
- dev->checkpt_byte_offs = dev->data_bytes_per_chunk;
- /* A checkpoint block list of 1 checkpoint block per 16 block is (hopefully)
- * going to be way more than we need */
- dev->blocks_in_checkpt = 0;
- dev->checkpt_max_blocks =
- (dev->internal_end_block - dev->internal_start_block) / 16 +
- 2;
- dev->checkpt_block_list =
- kmalloc(sizeof(int) * dev->checkpt_max_blocks, GFP_NOFS);
- if (!dev->checkpt_block_list)
- return 0;
-
- for (i = 0; i < dev->checkpt_max_blocks; i++)
- dev->checkpt_block_list[i] = -1;
}
+ /* Set to a value that will kick off a read */
+ dev->checkpt_byte_offs = dev->data_bytes_per_chunk;
+ /* A checkpoint block list of 1 checkpoint block per 16 block is
+ * (hopefully) going to be way more than we need */
+ dev->blocks_in_checkpt = 0;
+ dev->checkpt_max_blocks =
+ (dev->internal_end_block - dev->internal_start_block) / 16 + 2;
+ dev->checkpt_block_list =
+ kmalloc(sizeof(int) * dev->checkpt_max_blocks, GFP_NOFS);
+
+ if (!dev->checkpt_block_list)
+ return 0;
+
+ for (i = 0; i < dev->checkpt_max_blocks; i++)
+ dev->checkpt_block_list[i] = -1;
+
return 1;
}
int yaffs2_get_checkpt_sum(struct yaffs_dev *dev, u32 * sum)
{
u32 composite_sum;
- composite_sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
+
+ composite_sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xff);
*sum = composite_sum;
return 1;
}
@@ -201,7 +203,6 @@ static int yaffs2_checkpt_flush_buffer(struct yaffs_dev *dev)
{
int chunk;
int realigned_chunk;
-
struct yaffs_ext_tags tags;
if (dev->checkpt_cur_block < 0) {
@@ -257,7 +258,6 @@ int yaffs2_checkpt_wr(struct yaffs_dev *dev, const void *data, int n_bytes)
{
int i = 0;
int ok = 1;
-
u8 *data_bytes = (u8 *) data;
if (!dev->checkpt_buffer)
@@ -289,10 +289,8 @@ int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes)
int i = 0;
int ok = 1;
struct yaffs_ext_tags tags;
-
int chunk;
int realigned_chunk;
-
u8 *data_bytes = (u8 *) data;
if (!dev->checkpt_buffer)
@@ -311,50 +309,47 @@ int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes)
dev->checkpt_cur_chunk = 0;
}
- if (dev->checkpt_cur_block < 0)
+ if (dev->checkpt_cur_block < 0) {
ok = 0;
- else {
- chunk = dev->checkpt_cur_block *
- dev->param.chunks_per_block +
- dev->checkpt_cur_chunk;
-
- realigned_chunk = chunk - dev->chunk_offset;
-
- dev->n_page_reads++;
-
- /* read in the next chunk */
- dev->param.read_chunk_tags_fn(dev,
- realigned_chunk,
- dev->
- checkpt_buffer,
- &tags);
-
- if (tags.chunk_id != (dev->checkpt_page_seq + 1)
- || tags.ecc_result > YAFFS_ECC_RESULT_FIXED
- || tags.seq_number !=
- YAFFS_SEQUENCE_CHECKPOINT_DATA)
- ok = 0;
-
- dev->checkpt_byte_offs = 0;
- dev->checkpt_page_seq++;
- dev->checkpt_cur_chunk++;
-
- if (dev->checkpt_cur_chunk >=
- dev->param.chunks_per_block)
- dev->checkpt_cur_block = -1;
+ break;
}
- }
- if (ok) {
- *data_bytes =
- dev->checkpt_buffer[dev->checkpt_byte_offs];
- dev->checkpt_sum += *data_bytes;
- dev->checkpt_xor ^= *data_bytes;
- dev->checkpt_byte_offs++;
- i++;
- data_bytes++;
- dev->checkpt_byte_count++;
+ chunk = dev->checkpt_cur_block *
+ dev->param.chunks_per_block +
+ dev->checkpt_cur_chunk;
+
+ realigned_chunk = chunk - dev->chunk_offset;
+ dev->n_page_reads++;
+
+ /* read in the next chunk */
+ dev->param.read_chunk_tags_fn(dev,
+ realigned_chunk,
+ dev->checkpt_buffer,
+ &tags);
+
+ if (tags.chunk_id != (dev->checkpt_page_seq + 1) ||
+ tags.ecc_result > YAFFS_ECC_RESULT_FIXED ||
+ tags.seq_number != YAFFS_SEQUENCE_CHECKPOINT_DATA) {
+ ok = 0;
+ break;
+ }
+
+ dev->checkpt_byte_offs = 0;
+ dev->checkpt_page_seq++;
+ dev->checkpt_cur_chunk++;
+
+ if (dev->checkpt_cur_chunk >=
+ dev->param.chunks_per_block)
+ dev->checkpt_cur_block = -1;
}
+
+ *data_bytes = dev->checkpt_buffer[dev->checkpt_byte_offs];
+ dev->checkpt_sum += *data_bytes;
+ dev->checkpt_xor ^= *data_bytes;
+ dev->checkpt_byte_offs++;
+ i++;
+ data_bytes++;
+ dev->checkpt_byte_count++;
}
return i;
@@ -362,35 +357,33 @@ int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes)
int yaffs_checkpt_close(struct yaffs_dev *dev)
{
+ int i;
if (dev->checkpt_open_write) {
if (dev->checkpt_byte_offs != 0)
yaffs2_checkpt_flush_buffer(dev);
} else if (dev->checkpt_block_list) {
- int i;
for (i = 0;
- i < dev->blocks_in_checkpt
- && dev->checkpt_block_list[i] >= 0; i++) {
+ i < dev->blocks_in_checkpt &&
+ dev->checkpt_block_list[i] >= 0; i++) {
int blk = dev->checkpt_block_list[i];
struct yaffs_block_info *bi = NULL;
- if (dev->internal_start_block <= blk
- && blk <= dev->internal_end_block)
+
+ if (dev->internal_start_block <= blk &&
+ blk <= dev->internal_end_block)
bi = yaffs_get_block_info(dev, blk);
if (bi && bi->block_state == YAFFS_BLOCK_STATE_EMPTY)
bi->block_state = YAFFS_BLOCK_STATE_CHECKPOINT;
- else {
- /* Todo this looks odd... */
- }
}
kfree(dev->checkpt_block_list);
dev->checkpt_block_list = NULL;
}
dev->n_free_chunks -=
- dev->blocks_in_checkpt * dev->param.chunks_per_block;
+ dev->blocks_in_checkpt * dev->param.chunks_per_block;
dev->n_erased_blocks -= dev->blocks_in_checkpt;
- yaffs_trace(YAFFS_TRACE_CHECKPOINT,"checkpoint byte count %d",
+ yaffs_trace(YAFFS_TRACE_CHECKPOINT, "checkpoint byte count %d",
dev->checkpt_byte_count);
if (dev->checkpt_buffer) {
@@ -400,7 +393,7 @@ int yaffs_checkpt_close(struct yaffs_dev *dev)
return 1;
} else {
return 0;
- }
+ }
}
int yaffs2_checkpt_invalidate_stream(struct yaffs_dev *dev)
diff --git a/yaffs_checkptrw.h b/yaffs_checkptrw.h
index 361c606..cdbaba7 100644
--- a/yaffs_checkptrw.h
+++ b/yaffs_checkptrw.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_ecc.c b/yaffs_ecc.c
index e95a806..9294107 100644
--- a/yaffs_ecc.c
+++ b/yaffs_ecc.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -16,22 +16,22 @@
*
* The ECC comprises 22 bits of parity information and is stuffed into 3 bytes.
* The two unused bit are set to 1.
- * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC
- * blocks are used on a 512-byte NAND page.
+ * The ECC can correct single bit errors in a 256-byte page of data. Thus, two
+ * such ECC blocks are used on a 512-byte NAND page.
*
*/
+#include "yportenv.h"
+
+#include "yaffs_ecc.h"
+
/* Table generated by gen-ecc.c
* Using a table means we do not have to calculate p1..p4 and p1'..p4'
* for each byte of data. These are instead provided in a table in bits7..2.
- * Bit 0 of each entry indicates whether the entry has an odd or even parity, and therefore
- * this bytes influence on the line parity.
+ * Bit 0 of each entry indicates whether the entry has an odd or even parity,
+ * and therefore this bytes influence on the line parity.
*/
-#include "yportenv.h"
-
-#include "yaffs_ecc.h"
-
static const unsigned char column_parity_table[] = {
0x00, 0x55, 0x59, 0x0c, 0x65, 0x30, 0x3c, 0x69,
0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00,
@@ -69,10 +69,9 @@ static const unsigned char column_parity_table[] = {
/* Calculate the ECC for a 256-byte block of data */
-void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc)
+void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc)
{
unsigned int i;
-
unsigned char col_parity = 0;
unsigned char line_parity = 0;
unsigned char line_parity_prime = 0;
@@ -129,12 +128,6 @@ void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc)
t |= 0x01;
ecc[0] = ~t;
-#ifdef CONFIG_YAFFS_ECC_WRONG_ORDER
- /* Swap the bytes into the wrong order */
- t = ecc[0];
- ecc[0] = ecc[1];
- ecc[1] = t;
-#endif
}
/* Correct the ECC on a 256 byte block of data */
@@ -159,15 +152,6 @@ int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc,
unsigned byte;
unsigned bit;
-#ifdef CONFIG_YAFFS_ECC_WRONG_ORDER
- /* swap the bytes to correct for the wrong order */
- unsigned char t;
-
- t = d0;
- d0 = d1;
- d1 = t;
-#endif
-
bit = byte = 0;
if (d1 & 0x80)
@@ -222,7 +206,6 @@ void yaffs_ecc_calc_other(const unsigned char *data, unsigned n_bytes,
struct yaffs_ecc_other *ecc_other)
{
unsigned int i;
-
unsigned char col_parity = 0;
unsigned line_parity = 0;
unsigned line_parity_prime = 0;
diff --git a/yaffs_ecc.h b/yaffs_ecc.h
index b0c461d..17d47bd 100644
--- a/yaffs_ecc.h
+++ b/yaffs_ecc.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -18,8 +18,8 @@
*
* The ECC comprises 22 bits of parity information and is stuffed into 3 bytes.
* The two unused bit are set to 1.
- * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC
- * blocks are used on a 512-byte NAND page.
+ * The ECC can correct single bit errors in a 256-byte page of data.
+ * Thus, two such ECC blocks are used on a 512-byte NAND page.
*
*/
@@ -32,7 +32,7 @@ struct yaffs_ecc_other {
unsigned line_parity_prime;
};
-void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc);
+void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc);
int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc,
const unsigned char *test_ecc);
diff --git a/yaffs_getblockinfo.h b/yaffs_getblockinfo.h
index d87acbd..8fd0802 100644
--- a/yaffs_getblockinfo.h
+++ b/yaffs_getblockinfo.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -27,7 +27,7 @@ static inline struct yaffs_block_info *yaffs_get_block_info(struct yaffs_dev
yaffs_trace(YAFFS_TRACE_ERROR,
"**>> yaffs: get_block_info block %d is not valid",
blk);
- YBUG();
+ BUG();
}
return &dev->block_info[blk - dev->internal_start_block];
}
diff --git a/yaffs_guts.c b/yaffs_guts.c
index 486b7e0..9ade09b 100644
--- a/yaffs_guts.c
+++ b/yaffs_guts.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -15,25 +15,19 @@
#include "yaffs_trace.h"
#include "yaffs_guts.h"
-#include "yaffs_tagsvalidity.h"
#include "yaffs_getblockinfo.h"
-
#include "yaffs_tagscompat.h"
-
#include "yaffs_nand.h"
-
#include "yaffs_yaffs1.h"
#include "yaffs_yaffs2.h"
#include "yaffs_bitmap.h"
#include "yaffs_verify.h"
-
#include "yaffs_nand.h"
#include "yaffs_packedtags2.h"
-
#include "yaffs_nameval.h"
#include "yaffs_allocator.h"
-
#include "yaffs_attribs.h"
+#include "yaffs_summary.h"
/* Note YAFFS_GC_GOOD_ENOUGH must be <= YAFFS_GC_PASSIVE_THRESHOLD */
#define YAFFS_GC_GOOD_ENOUGH 2
@@ -44,14 +38,14 @@
/* Forward declarations */
static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
- const u8 * buffer, int n_bytes, int use_reserve);
+ const u8 *buffer, int n_bytes, int use_reserve);
/* Function to calculate chunk and offset */
-static void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
- int *chunk_out, u32 * offset_out)
+static inline void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
+ int *chunk_out, u32 *offset_out)
{
int chunk;
u32 offset;
@@ -82,7 +76,7 @@ static void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
* be hellishly efficient.
*/
-static u32 calc_shifts_ceiling(u32 x)
+static inline u32 calc_shifts_ceiling(u32 x)
{
int extra_bits;
int shifts;
@@ -105,7 +99,7 @@ static u32 calc_shifts_ceiling(u32 x)
/* Function to return the number of shifts to get a 1 in bit 0
*/
-static u32 calc_shifts(u32 x)
+static inline u32 calc_shifts(u32 x)
{
u32 shifts;
@@ -134,42 +128,30 @@ static int yaffs_init_tmp_buffers(struct yaffs_dev *dev)
memset(dev->temp_buffer, 0, sizeof(dev->temp_buffer));
for (i = 0; buf && i < YAFFS_N_TEMP_BUFFERS; i++) {
- dev->temp_buffer[i].line = 0; /* not in use */
- dev->temp_buffer[i].buffer = buf =
- kmalloc(dev->param.total_bytes_per_chunk, GFP_NOFS);
+ dev->temp_buffer[i].in_use = 0;
+ buf = kmalloc(dev->param.total_bytes_per_chunk, GFP_NOFS);
+ dev->temp_buffer[i].buffer = buf;
}
return buf ? YAFFS_OK : YAFFS_FAIL;
}
-u8 *yaffs_get_temp_buffer(struct yaffs_dev * dev, int line_no)
+u8 *yaffs_get_temp_buffer(struct yaffs_dev * dev)
{
- int i, j;
+ int i;
dev->temp_in_use++;
if (dev->temp_in_use > dev->max_temp)
dev->max_temp = dev->temp_in_use;
for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) {
- if (dev->temp_buffer[i].line == 0) {
- dev->temp_buffer[i].line = line_no;
- if ((i + 1) > dev->max_temp) {
- dev->max_temp = i + 1;
- for (j = 0; j <= i; j++)
- dev->temp_buffer[j].max_line =
- dev->temp_buffer[j].line;
- }
-
+ if (dev->temp_buffer[i].in_use == 0) {
+ dev->temp_buffer[i].in_use = 1;
return dev->temp_buffer[i].buffer;
}
}
- yaffs_trace(YAFFS_TRACE_BUFFERS,
- "Out of temp buffers at line %d, other held by lines:",
- line_no);
- for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++)
- yaffs_trace(YAFFS_TRACE_BUFFERS," %d", dev->temp_buffer[i].line);
-
+ yaffs_trace(YAFFS_TRACE_BUFFERS, "Out of temp buffers");
/*
* If we got here then we have to allocate an unmanaged one
* This is not good.
@@ -180,7 +162,7 @@ u8 *yaffs_get_temp_buffer(struct yaffs_dev * dev, int line_no)
}
-void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no)
+void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 *buffer)
{
int i;
@@ -188,16 +170,14 @@ void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no)
for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) {
if (dev->temp_buffer[i].buffer == buffer) {
- dev->temp_buffer[i].line = 0;
+ dev->temp_buffer[i].in_use = 0;
return;
}
}
if (buffer) {
/* assume it is an unmanaged one. */
- yaffs_trace(YAFFS_TRACE_BUFFERS,
- "Releasing unmanaged temp buffer in line %d",
- line_no);
+ yaffs_trace(YAFFS_TRACE_BUFFERS, "Releasing unmanaged temp buffer");
kfree(buffer);
dev->unmanaged_buffer_deallocs++;
}
@@ -207,7 +187,7 @@ void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no)
/*
* Determine if we have a managed buffer.
*/
-int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 * buffer)
+int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 *buffer)
{
int i;
@@ -235,7 +215,7 @@ int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 * buffer)
*/
static void yaffs_handle_chunk_wr_ok(struct yaffs_dev *dev, int nand_chunk,
- const u8 * data,
+ const u8 *data,
const struct yaffs_ext_tags *tags)
{
dev = dev;
@@ -261,8 +241,9 @@ void yaffs_handle_chunk_error(struct yaffs_dev *dev,
bi->chunk_error_strikes++;
if (bi->chunk_error_strikes > 3) {
- bi->needs_retiring = 1; /* Too many stikes, so retire this */
- yaffs_trace(YAFFS_TRACE_ALWAYS, "yaffs: Block struck out");
+ bi->needs_retiring = 1; /* Too many stikes, so retire */
+ yaffs_trace(YAFFS_TRACE_ALWAYS,
+ "yaffs: Block struck out");
}
}
@@ -277,7 +258,8 @@ static void yaffs_handle_chunk_wr_error(struct yaffs_dev *dev, int nand_chunk,
yaffs_handle_chunk_error(dev, bi);
if (erased_ok) {
- /* Was an actual write failure, so mark the block for retirement */
+ /* Was an actual write failure,
+ * so mark the block for retirement.*/
bi->needs_retiring = 1;
yaffs_trace(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
"**>> Block %d needs retiring", flash_block);
@@ -321,11 +303,11 @@ struct yaffs_obj *yaffs_lost_n_found(struct yaffs_dev *dev)
* Erased NAND checking functions
*/
-int yaffs_check_ff(u8 * buffer, int n_bytes)
+int yaffs_check_ff(u8 *buffer, int n_bytes)
{
/* Horrible, slow implementation */
while (n_bytes--) {
- if (*buffer != 0xFF)
+ if (*buffer != 0xff)
return 0;
buffer++;
}
@@ -335,7 +317,7 @@ int yaffs_check_ff(u8 * buffer, int n_bytes)
static int yaffs_check_chunk_erased(struct yaffs_dev *dev, int nand_chunk)
{
int retval = YAFFS_OK;
- u8 *data = yaffs_get_temp_buffer(dev, __LINE__);
+ u8 *data = yaffs_get_temp_buffer(dev);
struct yaffs_ext_tags tags;
int result;
@@ -346,11 +328,12 @@ static int yaffs_check_chunk_erased(struct yaffs_dev *dev, int nand_chunk)
if (!yaffs_check_ff(data, dev->data_bytes_per_chunk) ||
tags.chunk_used) {
- yaffs_trace(YAFFS_TRACE_NANDACCESS, "Chunk %d not erased", nand_chunk);
+ yaffs_trace(YAFFS_TRACE_NANDACCESS,
+ "Chunk %d not erased", nand_chunk);
retval = YAFFS_FAIL;
}
- yaffs_release_temp_buffer(dev, data, __LINE__);
+ yaffs_release_temp_buffer(dev, data);
return retval;
@@ -358,12 +341,12 @@ static int yaffs_check_chunk_erased(struct yaffs_dev *dev, int nand_chunk)
static int yaffs_verify_chunk_written(struct yaffs_dev *dev,
int nand_chunk,
- const u8 * data,
+ const u8 *data,
struct yaffs_ext_tags *tags)
{
int retval = YAFFS_OK;
struct yaffs_ext_tags temp_tags;
- u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+ u8 *buffer = yaffs_get_temp_buffer(dev);
int result;
result = yaffs_rd_chunk_tags_nand(dev, nand_chunk, buffer, &temp_tags);
@@ -373,7 +356,7 @@ static int yaffs_verify_chunk_written(struct yaffs_dev *dev,
temp_tags.n_bytes != tags->n_bytes)
retval = YAFFS_FAIL;
- yaffs_release_temp_buffer(dev, buffer, __LINE__);
+ yaffs_release_temp_buffer(dev, buffer);
return retval;
}
@@ -388,7 +371,7 @@ int yaffs_check_alloc_available(struct yaffs_dev *dev, int n_chunks)
checkpt_blocks = yaffs_calc_checkpt_blocks_required(dev);
reserved_chunks =
- ((reserved_blocks + checkpt_blocks) * dev->param.chunks_per_block);
+ (reserved_blocks + checkpt_blocks) * dev->param.chunks_per_block;
return (dev->n_free_chunks > (reserved_chunks + n_chunks));
}
@@ -396,7 +379,6 @@ int yaffs_check_alloc_available(struct yaffs_dev *dev, int n_chunks)
static int yaffs_find_alloc_block(struct yaffs_dev *dev)
{
int i;
-
struct yaffs_block_info *bi;
if (dev->n_erased_blocks < 1) {
@@ -404,7 +386,7 @@ static int yaffs_find_alloc_block(struct yaffs_dev *dev)
* Can't get space to gc
*/
yaffs_trace(YAFFS_TRACE_ERROR,
- "yaffs tragedy: no more erased blocks" );
+ "yaffs tragedy: no more erased blocks");
return -1;
}
@@ -453,7 +435,7 @@ static int yaffs_alloc_chunk(struct yaffs_dev *dev, int use_reserver,
}
if (!use_reserver && !yaffs_check_alloc_available(dev, 1)) {
- /* Not enough space to allocate unless we're allowed to use the reserve. */
+ /* No space unless we're allowed to use the reserve. */
return -1;
}
@@ -486,7 +468,8 @@ static int yaffs_alloc_chunk(struct yaffs_dev *dev, int use_reserver,
return ret_val;
}
- yaffs_trace(YAFFS_TRACE_ERROR, "!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!" );
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!");
return -1;
}
@@ -510,9 +493,10 @@ static int yaffs_get_erased_chunks(struct yaffs_dev *dev)
*/
void yaffs_skip_rest_of_block(struct yaffs_dev *dev)
{
+ struct yaffs_block_info *bi;
+
if (dev->alloc_block > 0) {
- struct yaffs_block_info *bi =
- yaffs_get_block_info(dev, dev->alloc_block);
+ bi = yaffs_get_block_info(dev, dev->alloc_block);
if (bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING) {
bi->block_state = YAFFS_BLOCK_STATE_FULL;
dev->alloc_block = -1;
@@ -521,7 +505,7 @@ void yaffs_skip_rest_of_block(struct yaffs_dev *dev)
}
static int yaffs_write_new_chunk(struct yaffs_dev *dev,
- const u8 * data,
+ const u8 *data,
struct yaffs_ext_tags *tags, int use_reserver)
{
int attempts = 0;
@@ -560,7 +544,7 @@ static int yaffs_write_new_chunk(struct yaffs_dev *dev,
* lot of checks that are most likely not needed.
*
* Mods to the above
- * If an erase check fails or the write fails we skip the
+ * If an erase check fails or the write fails we skip the
* rest of the block.
*/
@@ -614,7 +598,7 @@ static int yaffs_write_new_chunk(struct yaffs_dev *dev,
yaffs_trace(YAFFS_TRACE_ERROR,
"**>> yaffs write required %d attempts",
attempts);
- dev->n_retired_writes += (attempts - 1);
+ dev->n_retried_writes += (attempts - 1);
}
return chunk;
@@ -642,10 +626,10 @@ static void yaffs_retire_block(struct yaffs_dev *dev, int flash_block)
int chunk_id =
flash_block * dev->param.chunks_per_block;
- u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+ u8 *buffer = yaffs_get_temp_buffer(dev);
memset(buffer, 0xff, dev->data_bytes_per_chunk);
- yaffs_init_tags(&tags);
+ memset(&tags, 0, sizeof(tags));
tags.seq_number = YAFFS_SEQUENCE_BAD_BLOCK;
if (dev->param.write_chunk_tags_fn(dev, chunk_id -
dev->chunk_offset,
@@ -655,7 +639,7 @@ static void yaffs_retire_block(struct yaffs_dev *dev, int flash_block)
"yaffs: Failed to write bad block marker to block %d",
flash_block);
- yaffs_release_temp_buffer(dev, buffer, __LINE__);
+ yaffs_release_temp_buffer(dev, buffer);
}
}
@@ -668,35 +652,33 @@ static void yaffs_retire_block(struct yaffs_dev *dev, int flash_block)
/*---------------- Name handling functions ------------*/
-static u16 yaffs_calc_name_sum(const YCHAR * name)
+static u16 yaffs_calc_name_sum(const YCHAR *name)
{
u16 sum = 0;
u16 i = 1;
- const YUCHAR *bname = (const YUCHAR *)name;
- if (bname) {
- while ((*bname) && (i < (YAFFS_MAX_NAME_LENGTH / 2))) {
+ if (!name)
+ return 0;
+
+ while ((*name) && i < (YAFFS_MAX_NAME_LENGTH / 2)) {
- /* 0x1f mask is case insensitive */
- sum += ((*bname) & 0x1f) * i;
- i++;
- bname++;
- }
+ /* 0x1f mask is case insensitive */
+ sum += ((*name) & 0x1f) * i;
+ i++;
+ name++;
}
return sum;
}
void yaffs_set_obj_name(struct yaffs_obj *obj, const YCHAR * name)
{
-#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
memset(obj->short_name, 0, sizeof(obj->short_name));
- if (name &&
- strnlen(name, YAFFS_SHORT_NAME_LENGTH + 1) <=
- YAFFS_SHORT_NAME_LENGTH)
+ if (name &&
+ strnlen(name, YAFFS_SHORT_NAME_LENGTH + 1) <=
+ YAFFS_SHORT_NAME_LENGTH)
strcpy(obj->short_name, name);
else
obj->short_name[0] = _Y('\0');
-#endif
obj->sum = yaffs_calc_name_sum(name);
}
@@ -724,6 +706,7 @@ void yaffs_set_obj_name_from_oh(struct yaffs_obj *obj,
struct yaffs_tnode *yaffs_get_tnode(struct yaffs_dev *dev)
{
struct yaffs_tnode *tn = yaffs_alloc_raw_tnode(dev);
+
if (tn) {
memset(tn, 0, dev->tnode_size);
dev->n_tnodes++;
@@ -772,9 +755,9 @@ void yaffs_load_tnode_0(struct yaffs_dev *dev, struct yaffs_tnode *tn,
if (dev->tnode_width > (32 - bit_in_word)) {
bit_in_word = (32 - bit_in_word);
- word_in_map++;;
+ word_in_map++;
mask =
- dev->tnode_mask >> ( /*dev->tnode_width - */ bit_in_word);
+ dev->tnode_mask >> bit_in_word;
map[word_in_map] &= ~mask;
map[word_in_map] |= (mask & (val >> bit_in_word));
}
@@ -799,7 +782,7 @@ u32 yaffs_get_group_base(struct yaffs_dev *dev, struct yaffs_tnode *tn,
if (dev->tnode_width > (32 - bit_in_word)) {
bit_in_word = (32 - bit_in_word);
- word_in_map++;;
+ word_in_map++;
val |= (map[word_in_map] << bit_in_word);
}
@@ -860,15 +843,16 @@ struct yaffs_tnode *yaffs_find_tnode_0(struct yaffs_dev *dev,
return tn;
}
-/* AddOrFindLevel0Tnode finds the level 0 tnode if it exists, otherwise first expands the tree.
+/* add_find_tnode_0 finds the level 0 tnode if it exists,
+ * otherwise first expands the tree.
* This happens in two steps:
* 1. If the tree isn't tall enough, then make it taller.
* 2. Scan down the tree towards the level 0 tnode adding tnodes if required.
*
* Used when modifying the tree.
*
- * If the tn argument is NULL, then a fresh tnode will be added otherwise the specified tn will
- * be plugged into the ttree.
+ * If the tn argument is NULL, then a fresh tnode will be added otherwise the
+ * specified tn will be plugged into the ttree.
*/
struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
@@ -880,12 +864,11 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
int i;
int l;
struct yaffs_tnode *tn;
-
u32 x;
/* Check sane level and page Id */
- if (file_struct->top_level < 0
- || file_struct->top_level > YAFFS_TNODES_MAX_LEVEL)
+ if (file_struct->top_level < 0 ||
+ file_struct->top_level > YAFFS_TNODES_MAX_LEVEL)
return NULL;
if (chunk_id > YAFFS_MAX_CHUNK_ID)
@@ -911,7 +894,8 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
file_struct->top = tn;
file_struct->top_level++;
} else {
- yaffs_trace(YAFFS_TRACE_ERROR, "yaffs: no more tnodes");
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "yaffs: no more tnodes");
return NULL;
}
}
@@ -937,11 +921,10 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
} else if (l == 1) {
/* Looking from level 1 at level 0 */
if (passed_tn) {
- /* If we already have one, then release it. */
+ /* If we already have one, release it */
if (tn->internal[x])
yaffs_free_tnode(dev,
- tn->
- internal[x]);
+ tn->internal[x]);
tn->internal[x] = passed_tn;
} else if (!tn->internal[x]) {
@@ -971,13 +954,14 @@ static int yaffs_tags_match(const struct yaffs_ext_tags *tags, int obj_id,
int chunk_obj)
{
return (tags->chunk_id == chunk_obj &&
- tags->obj_id == obj_id && !tags->is_deleted) ? 1 : 0;
+ tags->obj_id == obj_id &&
+ !tags->is_deleted) ? 1 : 0;
}
static int yaffs_find_chunk_in_group(struct yaffs_dev *dev, int the_chunk,
- struct yaffs_ext_tags *tags, int obj_id,
- int inode_chunk)
+ struct yaffs_ext_tags *tags, int obj_id,
+ int inode_chunk)
{
int j;
@@ -991,7 +975,8 @@ static int yaffs_find_chunk_in_group(struct yaffs_dev *dev, int the_chunk,
else {
yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL,
tags);
- if (yaffs_tags_match(tags, obj_id, inode_chunk)) {
+ if (yaffs_tags_match(tags,
+ obj_id, inode_chunk)) {
/* found it; */
return the_chunk;
}
@@ -1010,7 +995,6 @@ static int yaffs_find_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
int the_chunk = -1;
struct yaffs_ext_tags local_tags;
int ret_val = -1;
-
struct yaffs_dev *dev = in->my_dev;
if (!tags) {
@@ -1020,13 +1004,13 @@ static int yaffs_find_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
tn = yaffs_find_tnode_0(dev, &in->variant.file_variant, inode_chunk);
- if (tn) {
- the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
+ if (!tn)
+ return ret_val;
- ret_val =
- yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
+ the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
+
+ ret_val = yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
inode_chunk);
- }
return ret_val;
}
@@ -1037,7 +1021,6 @@ static int yaffs_find_del_file_chunk(struct yaffs_obj *in, int inode_chunk,
struct yaffs_tnode *tn;
int the_chunk = -1;
struct yaffs_ext_tags local_tags;
-
struct yaffs_dev *dev = in->my_dev;
int ret_val = -1;
@@ -1048,18 +1031,17 @@ static int yaffs_find_del_file_chunk(struct yaffs_obj *in, int inode_chunk,
tn = yaffs_find_tnode_0(dev, &in->variant.file_variant, inode_chunk);
- if (tn) {
+ if (!tn)
+ return ret_val;
- the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
+ the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
- ret_val =
- yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
+ ret_val = yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
inode_chunk);
- /* Delete the entry in the filestructure (if found) */
- if (ret_val != -1)
- yaffs_load_tnode_0(dev, tn, inode_chunk, 0);
- }
+ /* Delete the entry in the filestructure (if found) */
+ if (ret_val != -1)
+ yaffs_load_tnode_0(dev, tn, inode_chunk, 0);
return ret_val;
}
@@ -1082,14 +1064,15 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
unsigned existing_serial, new_serial;
if (in->variant_type != YAFFS_OBJECT_TYPE_FILE) {
- /* Just ignore an attempt at putting a chunk into a non-file during scanning
+ /* Just ignore an attempt at putting a chunk into a non-file
+ * during scanning.
* If it is not during Scanning then something went wrong!
*/
if (!in_scan) {
yaffs_trace(YAFFS_TRACE_ERROR,
"yaffs tragedy:attempt to put data chunk into a non-file"
);
- YBUG();
+ BUG();
}
yaffs_chunk_del(dev, nand_chunk, 1, __LINE__);
@@ -1110,23 +1093,29 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
if (in_scan != 0) {
/* If we're scanning then we need to test for duplicates
- * NB This does not need to be efficient since it should only ever
+ * NB This does not need to be efficient since it should only
* happen when the power fails during a write, then only one
* chunk should ever be affected.
*
- * Correction for YAFFS2: This could happen quite a lot and we need to think about efficiency! TODO
- * Update: For backward scanning we don't need to re-read tags so this is quite cheap.
+ * Correction for YAFFS2: This could happen quite a lot and we
+ * need to think about efficiency! TODO
+ * Update: For backward scanning we don't need to re-read tags
+ * so this is quite cheap.
*/
if (existing_cunk > 0) {
- /* NB Right now existing chunk will not be real chunk_id if the chunk group size > 1
- * thus we have to do a FindChunkInFile to get the real chunk id.
+ /* NB Right now existing chunk will not be real
+ * chunk_id if the chunk group size > 1
+ * thus we have to do a FindChunkInFile to get the
+ * real chunk id.
*
- * We have a duplicate now we need to decide which one to use:
+ * We have a duplicate now we need to decide which
+ * one to use:
*
- * Backwards scanning YAFFS2: The old one is what we use, dump the new one.
- * Forward scanning YAFFS2: The new one is what we use, dump the old one.
- * YAFFS1: Get both sets of tags and compare serial numbers.
+ * Backwards scanning YAFFS2: The old one is what
+ * we use, dump the new one.
+ * YAFFS1: Get both sets of tags and compare serial
+ * numbers.
*/
if (in_scan > 0) {
@@ -1150,8 +1139,8 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
}
- /* NB The deleted flags should be false, otherwise the chunks will
- * not be loaded during a scan
+ /* NB The deleted flags should be false, otherwise
+ * the chunks will not be loaded during a scan
*/
if (in_scan > 0) {
@@ -1164,14 +1153,16 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
((existing_serial + 1) & 3) == new_serial)) {
/* Forward scanning.
* Use new
- * Delete the old one and drop through to update the tnode
+ * Delete the old one and drop through to
+ * update the tnode
*/
yaffs_chunk_del(dev, existing_cunk, 1,
__LINE__);
} else {
- /* Backward scanning or we want to use the existing one
- * Use existing.
- * Delete the new one and return early so that the tnode isn't changed
+ /* Backward scanning or we want to use the
+ * existing one
+ * Delete the new one and return early so that
+ * the tnode isn't changed
*/
yaffs_chunk_del(dev, nand_chunk, 1, __LINE__);
return YAFFS_OK;
@@ -1204,10 +1195,12 @@ static void yaffs_soft_del_chunk(struct yaffs_dev *dev, int chunk)
}
}
-/* SoftDeleteWorker scans backwards through the tnode tree and soft deletes all the chunks in the file.
- * All soft deleting does is increment the block's softdelete count and pulls the chunk out
- * of the tnode.
- * Thus, essentially this is the same as DeleteWorker except that the chunks are soft deleted.
+/* SoftDeleteWorker scans backwards through the tnode tree and soft deletes all
+ * the chunks in the file.
+ * All soft deleting does is increment the block's softdelete count and pulls
+ * the chunk out of the tnode.
+ * Thus, essentially this is the same as DeleteWorker except that the chunks
+ * are soft deleted.
*/
static int yaffs_soft_del_worker(struct yaffs_obj *in, struct yaffs_tnode *tn,
@@ -1218,54 +1211,42 @@ static int yaffs_soft_del_worker(struct yaffs_obj *in, struct yaffs_tnode *tn,
int all_done = 1;
struct yaffs_dev *dev = in->my_dev;
- if (tn) {
- if (level > 0) {
-
- for (i = YAFFS_NTNODES_INTERNAL - 1; all_done && i >= 0;
- i--) {
- if (tn->internal[i]) {
- all_done =
- yaffs_soft_del_worker(in,
- tn->internal
- [i],
- level - 1,
- (chunk_offset
- <<
- YAFFS_TNODES_INTERNAL_BITS)
- + i);
- if (all_done) {
- yaffs_free_tnode(dev,
- tn->internal
- [i]);
- tn->internal[i] = NULL;
- } else {
- /* Hoosterman... how could this happen? */
- }
- }
- }
- return (all_done) ? 1 : 0;
- } else if (level == 0) {
-
- for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0; i--) {
- the_chunk = yaffs_get_group_base(dev, tn, i);
- if (the_chunk) {
- /* Note this does not find the real chunk, only the chunk group.
- * We make an assumption that a chunk group is not larger than
- * a block.
- */
- yaffs_soft_del_chunk(dev, the_chunk);
- yaffs_load_tnode_0(dev, tn, i, 0);
- }
+ if (!tn)
+ return 1;
+ if (level > 0) {
+ for (i = YAFFS_NTNODES_INTERNAL - 1;
+ all_done && i >= 0;
+ i--) {
+ if (tn->internal[i]) {
+ all_done =
+ yaffs_soft_del_worker(in,
+ tn->internal[i],
+ level - 1,
+ (chunk_offset <<
+ YAFFS_TNODES_INTERNAL_BITS)
+ + i);
+ if (all_done) {
+ yaffs_free_tnode(dev,
+ tn->internal[i]);
+ tn->internal[i] = NULL;
+ } else {
+ /* Can this happen? */
+ }
}
- return 1;
-
}
-
+ return (all_done) ? 1 : 0;
}
+ /* level 0 */
+ for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0; i--) {
+ the_chunk = yaffs_get_group_base(dev, tn, i);
+ if (the_chunk) {
+ yaffs_soft_del_chunk(dev, the_chunk);
+ yaffs_load_tnode_0(dev, tn, i, 0);
+ }
+ }
return 1;
-
}
static void yaffs_remove_obj_from_dir(struct yaffs_obj *obj)
@@ -1293,19 +1274,19 @@ void yaffs_add_obj_to_dir(struct yaffs_obj *directory, struct yaffs_obj *obj)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: Trying to add an object to a null pointer directory"
);
- YBUG();
+ BUG();
return;
}
if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: Trying to add an object to a non-directory"
);
- YBUG();
+ BUG();
}
if (obj->siblings.prev == NULL) {
/* Not initialised */
- YBUG();
+ BUG();
}
yaffs_verify_dir(directory);
@@ -1329,11 +1310,10 @@ void yaffs_add_obj_to_dir(struct yaffs_obj *directory, struct yaffs_obj *obj)
static int yaffs_change_obj_name(struct yaffs_obj *obj,
struct yaffs_obj *new_dir,
- const YCHAR * new_name, int force, int shadows)
+ const YCHAR *new_name, int force, int shadows)
{
int unlink_op;
int del_op;
-
struct yaffs_obj *existing_target;
if (new_dir == NULL)
@@ -1343,58 +1323,48 @@ static int yaffs_change_obj_name(struct yaffs_obj *obj,
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_change_obj_name: new_dir is not a directory"
);
- YBUG();
+ BUG();
}
- /* TODO: Do we need this different handling for YAFFS2 and YAFFS1?? */
- if (obj->my_dev->param.is_yaffs2)
- unlink_op = (new_dir == obj->my_dev->unlinked_dir);
- else
- unlink_op = (new_dir == obj->my_dev->unlinked_dir
- && obj->variant_type == YAFFS_OBJECT_TYPE_FILE);
-
+ unlink_op = (new_dir == obj->my_dev->unlinked_dir);
del_op = (new_dir == obj->my_dev->del_dir);
existing_target = yaffs_find_by_name(new_dir, new_name);
/* If the object is a file going into the unlinked directory,
- * then it is OK to just stuff it in since duplicate names are allowed.
- * else only proceed if the new name does not exist and if we're putting
+ * then it is OK to just stuff it in since duplicate names are OK.
+ * else only proceed if the new name does not exist and we're putting
* it into a directory.
*/
- if ((unlink_op ||
- del_op ||
- force ||
- (shadows > 0) ||
- !existing_target) &&
- new_dir->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY) {
- yaffs_set_obj_name(obj, new_name);
- obj->dirty = 1;
+ if (!(unlink_op || del_op || force ||
+ shadows > 0 || !existing_target) ||
+ new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
+ return YAFFS_FAIL;
- yaffs_add_obj_to_dir(new_dir, obj);
+ yaffs_set_obj_name(obj, new_name);
+ obj->dirty = 1;
+ yaffs_add_obj_to_dir(new_dir, obj);
- if (unlink_op)
- obj->unlinked = 1;
+ if (unlink_op)
+ obj->unlinked = 1;
- /* If it is a deletion then we mark it as a shrink for gc purposes. */
- if (yaffs_update_oh(obj, new_name, 0, del_op, shadows, NULL) >=
- 0)
- return YAFFS_OK;
- }
+ /* If it is a deletion then we mark it as a shrink for gc */
+ if (yaffs_update_oh(obj, new_name, 0, del_op, shadows, NULL) >= 0)
+ return YAFFS_OK;
return YAFFS_FAIL;
}
-/*------------------------ Short Operations Cache ----------------------------------------
+/*------------------------ Short Operations Cache ------------------------------
* In many situations where there is no high level buffering a lot of
* reads might be short sequential reads, and a lot of writes may be short
* sequential writes. eg. scanning/writing a jpeg file.
* In these cases, a short read/write cache can provide a huge perfomance
* benefit with dumb-as-a-rock code.
- * In Linux, the page cache provides read buffering and the short op cache
+ * In Linux, the page cache provides read buffering and the short op cache
* provides write buffering.
*
- * There are a limited number (~10) of cache chunks per device so that we don't
+ * There are a small number (~10) of cache chunks per device so that we don't
* need a very intelligent search.
*/
@@ -1423,44 +1393,39 @@ static void yaffs_flush_file_cache(struct yaffs_obj *obj)
int chunk_written = 0;
int n_caches = obj->my_dev->param.n_caches;
- if (n_caches > 0) {
- do {
- cache = NULL;
-
- /* Find the dirty cache for this object with the lowest chunk id. */
- for (i = 0; i < n_caches; i++) {
- if (dev->cache[i].object == obj &&
- dev->cache[i].dirty) {
- if (!cache
- || dev->cache[i].chunk_id <
- lowest) {
- cache = &dev->cache[i];
- lowest = cache->chunk_id;
- }
- }
- }
-
- if (cache && !cache->locked) {
- /* Write it out and free it up */
+ if (n_caches < 1)
+ return;
+ do {
+ cache = NULL;
- chunk_written =
- yaffs_wr_data_obj(cache->object,
- cache->chunk_id,
- cache->data,
- cache->n_bytes, 1);
- cache->dirty = 0;
- cache->object = NULL;
+ /* Find the lowest dirty chunk for this object */
+ for (i = 0; i < n_caches; i++) {
+ if (dev->cache[i].object == obj &&
+ dev->cache[i].dirty) {
+ if (!cache ||
+ dev->cache[i].chunk_id < lowest) {
+ cache = &dev->cache[i];
+ lowest = cache->chunk_id;
+ }
}
+ }
- } while (cache && chunk_written > 0);
-
- if (cache)
- /* Hoosterman, disk full while writing cache out. */
- yaffs_trace(YAFFS_TRACE_ERROR,
- "yaffs tragedy: no space during cache write");
-
- }
+ if (cache && !cache->locked) {
+ /* Write it out and free it up */
+ chunk_written =
+ yaffs_wr_data_obj(cache->object,
+ cache->chunk_id,
+ cache->data,
+ cache->n_bytes, 1);
+ cache->dirty = 0;
+ cache->object = NULL;
+ }
+ } while (cache && chunk_written > 0);
+ if (cache)
+ /* Hoosterman, disk full while writing cache out. */
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "yaffs tragedy: no space during cache write");
}
/*yaffs_flush_whole_cache(dev)
@@ -1482,11 +1447,9 @@ void yaffs_flush_whole_cache(struct yaffs_dev *dev)
for (i = 0; i < n_caches && !obj; i++) {
if (dev->cache[i].object && dev->cache[i].dirty)
obj = dev->cache[i].object;
-
}
if (obj)
yaffs_flush_file_cache(obj);
-
} while (obj);
}
@@ -1506,7 +1469,6 @@ static struct yaffs_cache *yaffs_grab_chunk_worker(struct yaffs_dev *dev)
return &dev->cache[i];
}
}
-
return NULL;
}
@@ -1518,48 +1480,46 @@ static struct yaffs_cache *yaffs_grab_chunk_cache(struct yaffs_dev *dev)
int i;
int pushout;
- if (dev->param.n_caches > 0) {
- /* Try find a non-dirty one... */
-
- cache = yaffs_grab_chunk_worker(dev);
+ if (dev->param.n_caches < 1)
+ return NULL;
- if (!cache) {
- /* They were all dirty, find the last recently used object and flush
- * its cache, then find again.
- * NB what's here is not very accurate, we actually flush the object
- * the last recently used page.
- */
+ /* Try find a non-dirty one... */
- /* With locking we can't assume we can use entry zero */
+ cache = yaffs_grab_chunk_worker(dev);
- the_obj = dev->cache[0].object;
- usage = -1;
- cache = NULL;
- pushout = -1;
+ if (!cache) {
+ /* They were all dirty, find the LRU object and flush
+ * its cache, then find again.
+ * NB what's here is not very accurate,
+ * we actually flush the object with the LRU chunk.
+ */
- for (i = 0; i < dev->param.n_caches; i++) {
- if (dev->cache[i].object &&
- !dev->cache[i].locked &&
- (dev->cache[i].last_use < usage
- || !cache)) {
- usage = dev->cache[i].last_use;
- the_obj = dev->cache[i].object;
- cache = &dev->cache[i];
- pushout = i;
- }
- }
+ /* With locking we can't assume we can use entry zero,
+ * Set the_obj to a valid pointer for Coverity. */
+ the_obj = dev->cache[0].object;
+ usage = -1;
+ cache = NULL;
+ pushout = -1;
- if (!cache || cache->dirty) {
- /* Flush and try again */
- yaffs_flush_file_cache(the_obj);
- cache = yaffs_grab_chunk_worker(dev);
+ for (i = 0; i < dev->param.n_caches; i++) {
+ if (dev->cache[i].object &&
+ !dev->cache[i].locked &&
+ (dev->cache[i].last_use < usage ||
+ !cache)) {
+ usage = dev->cache[i].last_use;
+ the_obj = dev->cache[i].object;
+ cache = &dev->cache[i];
+ pushout = i;
}
+ }
+ if (!cache || cache->dirty) {
+ /* Flush and try again */
+ yaffs_flush_file_cache(the_obj);
+ cache = yaffs_grab_chunk_worker(dev);
}
- return cache;
- } else {
- return NULL;
- }
+ }
+ return cache;
}
/* Find a cached chunk */
@@ -1568,14 +1528,16 @@ static struct yaffs_cache *yaffs_find_chunk_cache(const struct yaffs_obj *obj,
{
struct yaffs_dev *dev = obj->my_dev;
int i;
- if (dev->param.n_caches > 0) {
- for (i = 0; i < dev->param.n_caches; i++) {
- if (dev->cache[i].object == obj &&
- dev->cache[i].chunk_id == chunk_id) {
- dev->cache_hits++;
- return &dev->cache[i];
- }
+ if (dev->param.n_caches < 1)
+ return NULL;
+
+ for (i = 0; i < dev->param.n_caches; i++) {
+ if (dev->cache[i].object == obj &&
+ dev->cache[i].chunk_id == chunk_id) {
+ dev->cache_hits++;
+
+ return &dev->cache[i];
}
}
return NULL;
@@ -1585,24 +1547,24 @@ static struct yaffs_cache *yaffs_find_chunk_cache(const struct yaffs_obj *obj,
static void yaffs_use_cache(struct yaffs_dev *dev, struct yaffs_cache *cache,
int is_write)
{
+ int i;
- if (dev->param.n_caches > 0) {
- if (dev->cache_last_use < 0 || dev->cache_last_use > 100000000) {
- /* Reset the cache usages */
- int i;
- for (i = 1; i < dev->param.n_caches; i++)
- dev->cache[i].last_use = 0;
-
- dev->cache_last_use = 0;
- }
-
- dev->cache_last_use++;
+ if (dev->param.n_caches < 1)
+ return;
- cache->last_use = dev->cache_last_use;
+ if (dev->cache_last_use < 0 ||
+ dev->cache_last_use > 100000000) {
+ /* Reset the cache usages */
+ for (i = 1; i < dev->param.n_caches; i++)
+ dev->cache[i].last_use = 0;
- if (is_write)
- cache->dirty = 1;
+ dev->cache_last_use = 0;
}
+ dev->cache_last_use++;
+ cache->last_use = dev->cache_last_use;
+
+ if (is_write)
+ cache->dirty = 1;
}
/* Invalidate a single cache page.
@@ -1611,9 +1573,10 @@ static void yaffs_use_cache(struct yaffs_dev *dev, struct yaffs_cache *cache,
*/
static void yaffs_invalidate_chunk_cache(struct yaffs_obj *object, int chunk_id)
{
+ struct yaffs_cache *cache;
+
if (object->my_dev->param.n_caches > 0) {
- struct yaffs_cache *cache =
- yaffs_find_chunk_cache(object, chunk_id);
+ cache = yaffs_find_chunk_cache(object, chunk_id);
if (cache)
cache->object = NULL;
@@ -1653,17 +1616,19 @@ static void yaffs_unhash_obj(struct yaffs_obj *obj)
/* FreeObject frees up a Object and puts it back on the free list */
static void yaffs_free_obj(struct yaffs_obj *obj)
{
- struct yaffs_dev *dev = obj->my_dev;
+ struct yaffs_dev *dev;
+ if (!obj) {
+ BUG();
+ return;
+ }
+ dev = obj->my_dev;
yaffs_trace(YAFFS_TRACE_OS, "FreeObject %p inode %p",
obj, obj->my_inode);
-
- if (!obj)
- YBUG();
if (obj->parent)
- YBUG();
+ BUG();
if (!list_empty(&obj->siblings))
- YBUG();
+ BUG();
if (obj->my_inode) {
/* We're still hooked up to a cached inode.
@@ -1688,15 +1653,13 @@ void yaffs_handle_defered_free(struct yaffs_obj *obj)
static int yaffs_generic_obj_del(struct yaffs_obj *in)
{
-
- /* First off, invalidate the file's data in the cache, without flushing. */
+ /* Iinvalidate the file's data in the cache, without flushing. */
yaffs_invalidate_whole_cache(in);
- if (in->my_dev->param.is_yaffs2 && (in->parent != in->my_dev->del_dir)) {
- /* Move to the unlinked directory so we have a record that it was deleted. */
+ if (in->my_dev->param.is_yaffs2 && in->parent != in->my_dev->del_dir) {
+ /* Move to unlinked directory so we have a deletion record */
yaffs_change_obj_name(in, in->my_dev->del_dir, _Y("deleted"), 0,
0);
-
}
yaffs_remove_obj_from_dir(in);
@@ -1710,25 +1673,26 @@ static int yaffs_generic_obj_del(struct yaffs_obj *in)
static void yaffs_soft_del_file(struct yaffs_obj *obj)
{
- if (obj->deleted &&
- obj->variant_type == YAFFS_OBJECT_TYPE_FILE && !obj->soft_del) {
- if (obj->n_data_chunks <= 0) {
- /* Empty file with no duplicate object headers,
- * just delete it immediately */
- yaffs_free_tnode(obj->my_dev,
- obj->variant.file_variant.top);
- obj->variant.file_variant.top = NULL;
- yaffs_trace(YAFFS_TRACE_TRACING,
- "yaffs: Deleting empty file %d",
- obj->obj_id);
- yaffs_generic_obj_del(obj);
- } else {
- yaffs_soft_del_worker(obj,
- obj->variant.file_variant.top,
- obj->variant.
- file_variant.top_level, 0);
- obj->soft_del = 1;
- }
+ if (!obj->deleted ||
+ obj->variant_type != YAFFS_OBJECT_TYPE_FILE ||
+ obj->soft_del)
+ return;
+
+ if (obj->n_data_chunks <= 0) {
+ /* Empty file with no duplicate object headers,
+ * just delete it immediately */
+ yaffs_free_tnode(obj->my_dev, obj->variant.file_variant.top);
+ obj->variant.file_variant.top = NULL;
+ yaffs_trace(YAFFS_TRACE_TRACING,
+ "yaffs: Deleting empty file %d",
+ obj->obj_id);
+ yaffs_generic_obj_del(obj);
+ } else {
+ yaffs_soft_del_worker(obj,
+ obj->variant.file_variant.top,
+ obj->variant.
+ file_variant.top_level, 0);
+ obj->soft_del = 1;
}
}
@@ -1754,44 +1718,40 @@ static struct yaffs_tnode *yaffs_prune_worker(struct yaffs_dev *dev,
int i;
int has_data;
- if (tn) {
- has_data = 0;
-
- if (level > 0) {
- for (i = 0; i < YAFFS_NTNODES_INTERNAL; i++) {
- if (tn->internal[i]) {
- tn->internal[i] =
- yaffs_prune_worker(dev,
- tn->internal[i],
- level - 1,
- (i ==
- 0) ? del0 : 1);
- }
-
- if (tn->internal[i])
- has_data++;
+ if (!tn)
+ return tn;
+
+ has_data = 0;
+
+ if (level > 0) {
+ for (i = 0; i < YAFFS_NTNODES_INTERNAL; i++) {
+ if (tn->internal[i]) {
+ tn->internal[i] =
+ yaffs_prune_worker(dev,
+ tn->internal[i],
+ level - 1,
+ (i == 0) ? del0 : 1);
}
- } else {
- int tnode_size_u32 = dev->tnode_size / sizeof(u32);
- u32 *map = (u32 *) tn;
- for (i = 0; !has_data && i < tnode_size_u32; i++) {
- if (map[i])
- has_data++;
- }
+ if (tn->internal[i])
+ has_data++;
}
+ } else {
+ int tnode_size_u32 = dev->tnode_size / sizeof(u32);
+ u32 *map = (u32 *) tn;
- if (has_data == 0 && del0) {
- /* Free and return NULL */
-
- yaffs_free_tnode(dev, tn);
- tn = NULL;
+ for (i = 0; !has_data && i < tnode_size_u32; i++) {
+ if (map[i])
+ has_data++;
}
-
}
+ if (has_data == 0 && del0) {
+ /* Free and return NULL */
+ yaffs_free_tnode(dev, tn);
+ tn = NULL;
+ }
return tn;
-
}
static int yaffs_prune_tree(struct yaffs_dev *dev,
@@ -1802,34 +1762,34 @@ static int yaffs_prune_tree(struct yaffs_dev *dev,
int done = 0;
struct yaffs_tnode *tn;
- if (file_struct->top_level > 0) {
- file_struct->top =
- yaffs_prune_worker(dev, file_struct->top,
- file_struct->top_level, 0);
+ if (file_struct->top_level < 1)
+ return YAFFS_OK;
- /* Now we have a tree with all the non-zero branches NULL but the height
- * is the same as it was.
- * Let's see if we can trim internal tnodes to shorten the tree.
- * We can do this if only the 0th element in the tnode is in use
- * (ie all the non-zero are NULL)
- */
+ file_struct->top =
+ yaffs_prune_worker(dev, file_struct->top, file_struct->top_level, 0);
- while (file_struct->top_level && !done) {
- tn = file_struct->top;
+ /* Now we have a tree with all the non-zero branches NULL but
+ * the height is the same as it was.
+ * Let's see if we can trim internal tnodes to shorten the tree.
+ * We can do this if only the 0th element in the tnode is in use
+ * (ie all the non-zero are NULL)
+ */
- has_data = 0;
- for (i = 1; i < YAFFS_NTNODES_INTERNAL; i++) {
- if (tn->internal[i])
- has_data++;
- }
+ while (file_struct->top_level && !done) {
+ tn = file_struct->top;
- if (!has_data) {
- file_struct->top = tn->internal[0];
- file_struct->top_level--;
- yaffs_free_tnode(dev, tn);
- } else {
- done = 1;
- }
+ has_data = 0;
+ for (i = 1; i < YAFFS_NTNODES_INTERNAL; i++) {
+ if (tn->internal[i])
+ has_data++;
+ }
+
+ if (!has_data) {
+ file_struct->top = tn->internal[0];
+ file_struct->top_level--;
+ yaffs_free_tnode(dev, tn);
+ } else {
+ done = 1;
}
}
@@ -1838,43 +1798,44 @@ static int yaffs_prune_tree(struct yaffs_dev *dev,
/*-------------------- End of File Structure functions.-------------------*/
-/* AllocateEmptyObject gets us a clean Object. Tries to make allocate more if we run out */
+/* alloc_empty_obj gets us a clean Object.*/
static struct yaffs_obj *yaffs_alloc_empty_obj(struct yaffs_dev *dev)
{
struct yaffs_obj *obj = yaffs_alloc_raw_obj(dev);
- if (obj) {
- dev->n_obj++;
+ if (!obj)
+ return obj;
- /* Now sweeten it up... */
+ dev->n_obj++;
- memset(obj, 0, sizeof(struct yaffs_obj));
- obj->being_created = 1;
+ /* Now sweeten it up... */
- obj->my_dev = dev;
- obj->hdr_chunk = 0;
- obj->variant_type = YAFFS_OBJECT_TYPE_UNKNOWN;
- INIT_LIST_HEAD(&(obj->hard_links));
- INIT_LIST_HEAD(&(obj->hash_link));
- INIT_LIST_HEAD(&obj->siblings);
+ memset(obj, 0, sizeof(struct yaffs_obj));
+ obj->being_created = 1;
- /* Now make the directory sane */
- if (dev->root_dir) {
- obj->parent = dev->root_dir;
- list_add(&(obj->siblings),
- &dev->root_dir->variant.dir_variant.children);
- }
+ obj->my_dev = dev;
+ obj->hdr_chunk = 0;
+ obj->variant_type = YAFFS_OBJECT_TYPE_UNKNOWN;
+ INIT_LIST_HEAD(&(obj->hard_links));
+ INIT_LIST_HEAD(&(obj->hash_link));
+ INIT_LIST_HEAD(&obj->siblings);
- /* Add it to the lost and found directory.
- * NB Can't put root or lost-n-found in lost-n-found so
- * check if lost-n-found exists first
- */
- if (dev->lost_n_found)
- yaffs_add_obj_to_dir(dev->lost_n_found, obj);
-
- obj->being_created = 0;
+ /* Now make the directory sane */
+ if (dev->root_dir) {
+ obj->parent = dev->root_dir;
+ list_add(&(obj->siblings),
+ &dev->root_dir->variant.dir_variant.children);
}
+ /* Add it to the lost and found directory.
+ * NB Can't put root or lost-n-found in lost-n-found so
+ * check if lost-n-found exists first
+ */
+ if (dev->lost_n_found)
+ yaffs_add_obj_to_dir(dev->lost_n_found, obj);
+
+ obj->being_created = 0;
+
dev->checkpoint_blocks_required = 0; /* force recalculation */
return obj;
@@ -1897,7 +1858,6 @@ static int yaffs_find_nice_bucket(struct yaffs_dev *dev)
lowest = dev->obj_bucket[dev->bucket_finder].count;
l = dev->bucket_finder;
}
-
}
return l;
@@ -1906,17 +1866,13 @@ static int yaffs_find_nice_bucket(struct yaffs_dev *dev)
static int yaffs_new_obj_id(struct yaffs_dev *dev)
{
int bucket = yaffs_find_nice_bucket(dev);
-
- /* Now find an object value that has not already been taken
- * by scanning the list.
- */
-
int found = 0;
struct list_head *i;
-
u32 n = (u32) bucket;
- /* yaffs_check_obj_hash_sane(); */
+ /* Now find an object value that has not already been taken
+ * by scanning the list.
+ */
while (!found) {
found = 1;
@@ -1931,7 +1887,6 @@ static int yaffs_new_obj_id(struct yaffs_dev *dev)
}
}
}
-
return n;
}
@@ -1954,7 +1909,7 @@ struct yaffs_obj *yaffs_find_by_number(struct yaffs_dev *dev, u32 number)
/* Look if it is in the list */
in = list_entry(i, struct yaffs_obj, hash_link);
if (in->obj_id == number) {
- /* Don't tell the VFS about this one if it is defered free */
+ /* Don't show if it is defered free */
if (in->defered_free)
return NULL;
return in;
@@ -1986,38 +1941,35 @@ struct yaffs_obj *yaffs_new_obj(struct yaffs_dev *dev, int number,
return NULL;
}
- if (the_obj) {
- the_obj->fake = 0;
- the_obj->rename_allowed = 1;
- the_obj->unlink_allowed = 1;
- the_obj->obj_id = number;
- yaffs_hash_obj(the_obj);
- the_obj->variant_type = type;
- yaffs_load_current_time(the_obj, 1, 1);
+ the_obj->fake = 0;
+ the_obj->rename_allowed = 1;
+ the_obj->unlink_allowed = 1;
+ the_obj->obj_id = number;
+ yaffs_hash_obj(the_obj);
+ the_obj->variant_type = type;
+ yaffs_load_current_time(the_obj, 1, 1);
- switch (type) {
- case YAFFS_OBJECT_TYPE_FILE:
- the_obj->variant.file_variant.file_size = 0;
- the_obj->variant.file_variant.scanned_size = 0;
- the_obj->variant.file_variant.shrink_size = ~0; /* max */
- the_obj->variant.file_variant.top_level = 0;
- the_obj->variant.file_variant.top = tn;
- break;
- case YAFFS_OBJECT_TYPE_DIRECTORY:
- INIT_LIST_HEAD(&the_obj->variant.dir_variant.children);
- INIT_LIST_HEAD(&the_obj->variant.dir_variant.dirty);
- break;
- case YAFFS_OBJECT_TYPE_SYMLINK:
- case YAFFS_OBJECT_TYPE_HARDLINK:
- case YAFFS_OBJECT_TYPE_SPECIAL:
- /* No action required */
- break;
- case YAFFS_OBJECT_TYPE_UNKNOWN:
- /* todo this should not happen */
- break;
- }
+ switch (type) {
+ case YAFFS_OBJECT_TYPE_FILE:
+ the_obj->variant.file_variant.file_size = 0;
+ the_obj->variant.file_variant.scanned_size = 0;
+ the_obj->variant.file_variant.shrink_size = ~0; /* max */
+ the_obj->variant.file_variant.top_level = 0;
+ the_obj->variant.file_variant.top = tn;
+ break;
+ case YAFFS_OBJECT_TYPE_DIRECTORY:
+ INIT_LIST_HEAD(&the_obj->variant.dir_variant.children);
+ INIT_LIST_HEAD(&the_obj->variant.dir_variant.dirty);
+ break;
+ case YAFFS_OBJECT_TYPE_SYMLINK:
+ case YAFFS_OBJECT_TYPE_HARDLINK:
+ case YAFFS_OBJECT_TYPE_SPECIAL:
+ /* No action required */
+ break;
+ case YAFFS_OBJECT_TYPE_UNKNOWN:
+ /* todo this should not happen */
+ break;
}
-
return the_obj;
}
@@ -2027,17 +1979,18 @@ static struct yaffs_obj *yaffs_create_fake_dir(struct yaffs_dev *dev,
struct yaffs_obj *obj =
yaffs_new_obj(dev, number, YAFFS_OBJECT_TYPE_DIRECTORY);
- if (obj) {
- obj->fake = 1; /* it is fake so it might have no NAND presence... */
- obj->rename_allowed = 0; /* ... and we're not allowed to rename it... */
- obj->unlink_allowed = 0; /* ... or unlink it */
- obj->deleted = 0;
- obj->unlinked = 0;
- obj->yst_mode = mode;
- obj->my_dev = dev;
- obj->hdr_chunk = 0; /* Not a valid chunk. */
- }
+ if (!obj)
+ return NULL;
+
+ obj->fake = 1; /* it is fake so it might not use NAND */
+ obj->rename_allowed = 0;
+ obj->unlink_allowed = 0;
+ obj->deleted = 0;
+ obj->unlinked = 0;
+ obj->yst_mode = mode;
+ obj->my_dev = dev;
+ obj->hdr_chunk = 0; /* Not a valid chunk. */
return obj;
}
@@ -2049,7 +2002,6 @@ static void yaffs_init_tnodes_and_objs(struct yaffs_dev *dev)
dev->n_obj = 0;
dev->n_tnodes = 0;
-
yaffs_init_raw_tnodes_and_objs(dev);
for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
@@ -2074,7 +2026,7 @@ struct yaffs_obj *yaffs_find_or_create_by_number(struct yaffs_dev *dev,
}
-YCHAR *yaffs_clone_str(const YCHAR * str)
+YCHAR *yaffs_clone_str(const YCHAR *str)
{
YCHAR *new_str = NULL;
int len;
@@ -2110,6 +2062,7 @@ YCHAR *yaffs_clone_str(const YCHAR * str)
static void yaffs_update_parent(struct yaffs_obj *obj)
{
struct yaffs_dev *dev;
+
if (!obj)
return;
dev = obj->my_dev;
@@ -2127,7 +2080,7 @@ static void yaffs_update_parent(struct yaffs_obj *obj)
} else {
yaffs_update_oh(obj, NULL, 0, 0, 0, NULL);
- }
+ }
}
void yaffs_update_dirty_dirs(struct yaffs_dev *dev)
@@ -2164,19 +2117,19 @@ void yaffs_update_dirty_dirs(struct yaffs_dev *dev)
static struct yaffs_obj *yaffs_create_obj(enum yaffs_obj_type type,
struct yaffs_obj *parent,
- const YCHAR * name,
+ const YCHAR *name,
u32 mode,
u32 uid,
u32 gid,
struct yaffs_obj *equiv_obj,
- const YCHAR * alias_str, u32 rdev)
+ const YCHAR *alias_str, u32 rdev)
{
struct yaffs_obj *in;
YCHAR *str = NULL;
-
struct yaffs_dev *dev = parent->my_dev;
- /* Check if the entry exists. If it does then fail the call since we don't want a dup. */
+ /* Check if the entry exists.
+ * If it does then fail the call since we don't want a dup. */
if (yaffs_find_by_name(parent, name))
return NULL;
@@ -2189,68 +2142,65 @@ static struct yaffs_obj *yaffs_create_obj(enum yaffs_obj_type type,
in = yaffs_new_obj(dev, -1, type);
if (!in) {
- if (str)
- kfree(str);
+ kfree(str);
return NULL;
}
- if (in) {
- in->hdr_chunk = 0;
- in->valid = 1;
- in->variant_type = type;
+ in->hdr_chunk = 0;
+ in->valid = 1;
+ in->variant_type = type;
- in->yst_mode = mode;
+ in->yst_mode = mode;
- yaffs_attribs_init(in, gid, uid, rdev);
+ yaffs_attribs_init(in, gid, uid, rdev);
- in->n_data_chunks = 0;
+ in->n_data_chunks = 0;
- yaffs_set_obj_name(in, name);
- in->dirty = 1;
+ yaffs_set_obj_name(in, name);
+ in->dirty = 1;
- yaffs_add_obj_to_dir(parent, in);
+ yaffs_add_obj_to_dir(parent, in);
- in->my_dev = parent->my_dev;
+ in->my_dev = parent->my_dev;
- switch (type) {
- case YAFFS_OBJECT_TYPE_SYMLINK:
- in->variant.symlink_variant.alias = str;
- break;
- case YAFFS_OBJECT_TYPE_HARDLINK:
- in->variant.hardlink_variant.equiv_obj = equiv_obj;
- in->variant.hardlink_variant.equiv_id =
- equiv_obj->obj_id;
- list_add(&in->hard_links, &equiv_obj->hard_links);
- break;
- case YAFFS_OBJECT_TYPE_FILE:
- case YAFFS_OBJECT_TYPE_DIRECTORY:
- case YAFFS_OBJECT_TYPE_SPECIAL:
- case YAFFS_OBJECT_TYPE_UNKNOWN:
- /* do nothing */
- break;
- }
+ switch (type) {
+ case YAFFS_OBJECT_TYPE_SYMLINK:
+ in->variant.symlink_variant.alias = str;
+ break;
+ case YAFFS_OBJECT_TYPE_HARDLINK:
+ in->variant.hardlink_variant.equiv_obj = equiv_obj;
+ in->variant.hardlink_variant.equiv_id = equiv_obj->obj_id;
+ list_add(&in->hard_links, &equiv_obj->hard_links);
+ break;
+ case YAFFS_OBJECT_TYPE_FILE:
+ case YAFFS_OBJECT_TYPE_DIRECTORY:
+ case YAFFS_OBJECT_TYPE_SPECIAL:
+ case YAFFS_OBJECT_TYPE_UNKNOWN:
+ /* do nothing */
+ break;
+ }
- if (yaffs_update_oh(in, name, 0, 0, 0, NULL) < 0) {
- /* Could not create the object header, fail the creation */
- yaffs_del_obj(in);
- in = NULL;
- }
+ if (yaffs_update_oh(in, name, 0, 0, 0, NULL) < 0) {
+ /* Could not create the object header, fail */
+ yaffs_del_obj(in);
+ in = NULL;
+ }
+ if (in)
yaffs_update_parent(parent);
- }
return in;
}
struct yaffs_obj *yaffs_create_file(struct yaffs_obj *parent,
- const YCHAR * name, u32 mode, u32 uid,
+ const YCHAR *name, u32 mode, u32 uid,
u32 gid)
{
return yaffs_create_obj(YAFFS_OBJECT_TYPE_FILE, parent, name, mode,
uid, gid, NULL, NULL, 0);
}
-struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR * name,
+struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR *name,
u32 mode, u32 uid, u32 gid)
{
return yaffs_create_obj(YAFFS_OBJECT_TYPE_DIRECTORY, parent, name,
@@ -2258,7 +2208,7 @@ struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR * name,
}
struct yaffs_obj *yaffs_create_special(struct yaffs_obj *parent,
- const YCHAR * name, u32 mode, u32 uid,
+ const YCHAR *name, u32 mode, u32 uid,
u32 gid, u32 rdev)
{
return yaffs_create_obj(YAFFS_OBJECT_TYPE_SPECIAL, parent, name, mode,
@@ -2266,8 +2216,8 @@ struct yaffs_obj *yaffs_create_special(struct yaffs_obj *parent,
}
struct yaffs_obj *yaffs_create_symlink(struct yaffs_obj *parent,
- const YCHAR * name, u32 mode, u32 uid,
- u32 gid, const YCHAR * alias)
+ const YCHAR *name, u32 mode, u32 uid,
+ u32 gid, const YCHAR *alias)
{
return yaffs_create_obj(YAFFS_OBJECT_TYPE_SYMLINK, parent, name, mode,
uid, gid, NULL, alias, 0);
@@ -2277,22 +2227,40 @@ struct yaffs_obj *yaffs_create_symlink(struct yaffs_obj *parent,
struct yaffs_obj *yaffs_link_obj(struct yaffs_obj *parent, const YCHAR * name,
struct yaffs_obj *equiv_obj)
{
- /* Get the real object in case we were fed a hard link as an equivalent object */
+ /* Get the real object in case we were fed a hard link obj */
equiv_obj = yaffs_get_equivalent_obj(equiv_obj);
- if (yaffs_create_obj
- (YAFFS_OBJECT_TYPE_HARDLINK, parent, name, 0, 0, 0,
- equiv_obj, NULL, 0)) {
+ if (yaffs_create_obj(YAFFS_OBJECT_TYPE_HARDLINK,
+ parent, name, 0, 0, 0,
+ equiv_obj, NULL, 0))
return equiv_obj;
- } else {
- return NULL;
- }
+
+ return NULL;
}
-/*------------------------- Block Management and Page Allocation ----------------*/
+/*---------------------- Block Management and Page Allocation -------------*/
+
+static void yaffs_deinit_blocks(struct yaffs_dev *dev)
+{
+ if (dev->block_info_alt && dev->block_info)
+ vfree(dev->block_info);
+ else
+ kfree(dev->block_info);
+
+ dev->block_info_alt = 0;
+
+ dev->block_info = NULL;
+
+ if (dev->chunk_bits_alt && dev->chunk_bits)
+ vfree(dev->chunk_bits);
+ else
+ kfree(dev->chunk_bits);
+ dev->chunk_bits_alt = 0;
+ dev->chunk_bits = NULL;
+}
static int yaffs_init_blocks(struct yaffs_dev *dev)
{
@@ -2300,7 +2268,6 @@ static int yaffs_init_blocks(struct yaffs_dev *dev)
dev->block_info = NULL;
dev->chunk_bits = NULL;
-
dev->alloc_block = -1; /* force it to get a new one */
/* If the first allocation strategy fails, thry the alternate one */
@@ -2312,56 +2279,41 @@ static int yaffs_init_blocks(struct yaffs_dev *dev)
dev->block_info_alt = 1;
} else {
dev->block_info_alt = 0;
- }
+ }
- if (dev->block_info) {
- /* Set up dynamic blockinfo stuff. Round up bytes. */
- dev->chunk_bit_stride = (dev->param.chunks_per_block + 7) / 8;
+ if (!dev->block_info)
+ goto alloc_error;
+
+ /* Set up dynamic blockinfo stuff. Round up bytes. */
+ dev->chunk_bit_stride = (dev->param.chunks_per_block + 7) / 8;
+ dev->chunk_bits =
+ kmalloc(dev->chunk_bit_stride * n_blocks, GFP_NOFS);
+ if (!dev->chunk_bits) {
dev->chunk_bits =
- kmalloc(dev->chunk_bit_stride * n_blocks, GFP_NOFS);
- if (!dev->chunk_bits) {
- dev->chunk_bits =
- vmalloc(dev->chunk_bit_stride * n_blocks);
- dev->chunk_bits_alt = 1;
- } else {
- dev->chunk_bits_alt = 0;
- }
+ vmalloc(dev->chunk_bit_stride * n_blocks);
+ dev->chunk_bits_alt = 1;
+ } else {
+ dev->chunk_bits_alt = 0;
}
+ if (!dev->chunk_bits)
+ goto alloc_error;
- if (dev->block_info && dev->chunk_bits) {
- memset(dev->block_info, 0,
- n_blocks * sizeof(struct yaffs_block_info));
- memset(dev->chunk_bits, 0, dev->chunk_bit_stride * n_blocks);
- return YAFFS_OK;
- }
+ memset(dev->block_info, 0, n_blocks * sizeof(struct yaffs_block_info));
+ memset(dev->chunk_bits, 0, dev->chunk_bit_stride * n_blocks);
+ return YAFFS_OK;
+
+alloc_error:
+ yaffs_deinit_blocks(dev);
return YAFFS_FAIL;
}
-static void yaffs_deinit_blocks(struct yaffs_dev *dev)
-{
- if (dev->block_info_alt && dev->block_info)
- vfree(dev->block_info);
- else if (dev->block_info)
- kfree(dev->block_info);
-
- dev->block_info_alt = 0;
-
- dev->block_info = NULL;
-
- if (dev->chunk_bits_alt && dev->chunk_bits)
- vfree(dev->chunk_bits);
- else if (dev->chunk_bits)
- kfree(dev->chunk_bits);
- dev->chunk_bits_alt = 0;
- dev->chunk_bits = NULL;
-}
void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
{
struct yaffs_block_info *bi = yaffs_get_block_info(dev, block_no);
-
int erased_ok = 0;
+ int i;
/* If the block is still healthy erase it and mark as clean.
* If the block has had a data failure, then retire it.
@@ -2376,11 +2328,12 @@ void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
bi->block_state = YAFFS_BLOCK_STATE_DIRTY;
- /* If this is the block being garbage collected then stop gc'ing this block */
+ /* If this is the block being garbage collected then stop gc'ing */
if (block_no == dev->gc_block)
dev->gc_block = 0;
- /* If this block is currently the best candidate for gc then drop as a candidate */
+ /* If this block is currently the best candidate for gc
+ * then drop as a candidate */
if (block_no == dev->gc_dirtiest) {
dev->gc_dirtiest = 0;
dev->gc_pages_in_use = 0;
@@ -2396,13 +2349,13 @@ void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
}
}
+ /* Verify erasure if needed */
if (erased_ok &&
- ((yaffs_trace_mask & YAFFS_TRACE_ERASE)
- || !yaffs_skip_verification(dev))) {
- int i;
+ ((yaffs_trace_mask & YAFFS_TRACE_ERASE) ||
+ !yaffs_skip_verification(dev))) {
for (i = 0; i < dev->param.chunks_per_block; i++) {
- if (!yaffs_check_chunk_erased
- (dev, block_no * dev->param.chunks_per_block + i)) {
+ if (!yaffs_check_chunk_erased(dev,
+ block_no * dev->param.chunks_per_block + i)) {
yaffs_trace(YAFFS_TRACE_ERROR,
">>Block %d erasure supposedly OK, but chunk %d not erased",
block_no, i);
@@ -2410,51 +2363,185 @@ void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
}
}
- if (erased_ok) {
- /* Clean it up... */
- bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
- bi->seq_number = 0;
- dev->n_erased_blocks++;
- bi->pages_in_use = 0;
- bi->soft_del_pages = 0;
- bi->has_shrink_hdr = 0;
- bi->skip_erased_check = 1; /* Clean, so no need to check */
- bi->gc_prioritise = 0;
- yaffs_clear_chunk_bits(dev, block_no);
-
- yaffs_trace(YAFFS_TRACE_ERASE,
- "Erased block %d", block_no);
- } else {
+ if (!erased_ok) {
/* We lost a block of free space */
dev->n_free_chunks -= dev->param.chunks_per_block;
yaffs_retire_block(dev, block_no);
yaffs_trace(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
"**>> Block %d retired", block_no);
+ return;
}
+
+ /* Clean it up... */
+ bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
+ bi->seq_number = 0;
+ dev->n_erased_blocks++;
+ bi->pages_in_use = 0;
+ bi->soft_del_pages = 0;
+ bi->has_shrink_hdr = 0;
+ bi->skip_erased_check = 1; /* Clean, so no need to check */
+ bi->gc_prioritise = 0;
+ bi->has_summary=0;
+
+ yaffs_clear_chunk_bits(dev, block_no);
+
+ yaffs_trace(YAFFS_TRACE_ERASE, "Erased block %d", block_no);
}
+static inline int yaffs_gc_process_chunk(struct yaffs_dev *dev,
+ struct yaffs_block_info *bi,
+ int old_chunk, u8 *buffer)
+{
+ int new_chunk;
+ int mark_flash = 1;
+ struct yaffs_ext_tags tags;
+ struct yaffs_obj *object;
+ int matching_chunk;
+ int ret_val = YAFFS_OK;
+
+ memset(&tags, 0, sizeof(tags));
+ yaffs_rd_chunk_tags_nand(dev, old_chunk,
+ buffer, &tags);
+ object = yaffs_find_by_number(dev, tags.obj_id);
+
+ yaffs_trace(YAFFS_TRACE_GC_DETAIL,
+ "Collecting chunk in block %d, %d %d %d ",
+ dev->gc_chunk, tags.obj_id,
+ tags.chunk_id, tags.n_bytes);
+
+ if (object && !yaffs_skip_verification(dev)) {
+ if (tags.chunk_id == 0)
+ matching_chunk =
+ object->hdr_chunk;
+ else if (object->soft_del)
+ /* Defeat the test */
+ matching_chunk = old_chunk;
+ else
+ matching_chunk =
+ yaffs_find_chunk_in_file
+ (object, tags.chunk_id,
+ NULL);
+
+ if (old_chunk != matching_chunk)
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "gc: page in gc mismatch: %d %d %d %d",
+ old_chunk,
+ matching_chunk,
+ tags.obj_id,
+ tags.chunk_id);
+ }
+
+ if (!object) {
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "page %d in gc has no object: %d %d %d ",
+ old_chunk,
+ tags.obj_id, tags.chunk_id,
+ tags.n_bytes);
+ }
+
+ if (object &&
+ object->deleted &&
+ object->soft_del && tags.chunk_id != 0) {
+ /* Data chunk in a soft deleted file,
+ * throw it away.
+ * It's a soft deleted data chunk,
+ * No need to copy this, just forget
+ * about it and fix up the object.
+ */
+
+ /* Free chunks already includes
+ * softdeleted chunks, how ever this
+ * chunk is going to soon be really
+ * deleted which will increment free
+ * chunks. We have to decrement free
+ * chunks so this works out properly.
+ */
+ dev->n_free_chunks--;
+ bi->soft_del_pages--;
+
+ object->n_data_chunks--;
+ if (object->n_data_chunks <= 0) {
+ /* remeber to clean up obj */
+ dev->gc_cleanup_list[dev->n_clean_ups] = tags.obj_id;
+ dev->n_clean_ups++;
+ }
+ mark_flash = 0;
+ } else if (object) {
+ /* It's either a data chunk in a live
+ * file or an ObjectHeader, so we're
+ * interested in it.
+ * NB Need to keep the ObjectHeaders of
+ * deleted files until the whole file
+ * has been deleted off
+ */
+ tags.serial_number++;
+ dev->n_gc_copies++;
+
+ if (tags.chunk_id == 0) {
+ /* It is an object Id,
+ * We need to nuke the
+ * shrinkheader flags since its
+ * work is done.
+ * Also need to clean up
+ * shadowing.
+ */
+ struct yaffs_obj_hdr *oh;
+ oh = (struct yaffs_obj_hdr *) buffer;
+
+ oh->is_shrink = 0;
+ tags.extra_is_shrink = 0;
+ oh->shadows_obj = 0;
+ oh->inband_shadowed_obj_id = 0;
+ tags.extra_shadows = 0;
+
+ /* Update file size */
+ if (object->variant_type == YAFFS_OBJECT_TYPE_FILE) {
+ oh->file_size =
+ object->variant.file_variant.file_size;
+ tags.extra_length = oh->file_size;
+ }
+
+ yaffs_verify_oh(object, oh, &tags, 1);
+ new_chunk =
+ yaffs_write_new_chunk(dev, (u8 *) oh, &tags, 1);
+ } else {
+ new_chunk =
+ yaffs_write_new_chunk(dev, buffer, &tags, 1);
+ }
+ if (new_chunk < 0) {
+ ret_val = YAFFS_FAIL;
+ } else {
+
+ /* Now fix up the Tnodes etc. */
+
+ if (tags.chunk_id == 0) {
+ /* It's a header */
+ object->hdr_chunk = new_chunk;
+ object->serial = tags.serial_number;
+ } else {
+ /* It's a data chunk */
+ yaffs_put_chunk_in_file(object, tags.chunk_id,
+ new_chunk, 0);
+ }
+ }
+ }
+ if (ret_val == YAFFS_OK)
+ yaffs_chunk_del(dev, old_chunk, mark_flash, __LINE__);
+ return ret_val;
+}
static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
{
int old_chunk;
- int new_chunk;
- int mark_flash;
int ret_val = YAFFS_OK;
int i;
int is_checkpt_block;
- int matching_chunk;
int max_copies;
-
int chunks_before = yaffs_get_erased_chunks(dev);
int chunks_after;
-
- struct yaffs_ext_tags tags;
-
struct yaffs_block_info *bi = yaffs_get_block_info(dev, block);
- struct yaffs_obj *object;
-
is_checkpt_block = (bi->block_state == YAFFS_BLOCK_STATE_CHECKPOINT);
yaffs_trace(YAFFS_TRACE_TRACING,
@@ -2471,200 +2558,36 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
dev->gc_disable = 1;
+ yaffs_summary_gc(dev, block);
+
if (is_checkpt_block || !yaffs_still_some_chunks(dev, block)) {
yaffs_trace(YAFFS_TRACE_TRACING,
"Collecting block %d that has no chunks in use",
- block);
+ block);
yaffs_block_became_dirty(dev, block);
} else {
- u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+ u8 *buffer = yaffs_get_temp_buffer(dev);
yaffs_verify_blk(dev, bi, block);
max_copies = (whole_block) ? dev->param.chunks_per_block : 5;
old_chunk = block * dev->param.chunks_per_block + dev->gc_chunk;
- for ( /* init already done */ ;
+ for (/* init already done */ ;
ret_val == YAFFS_OK &&
dev->gc_chunk < dev->param.chunks_per_block &&
(bi->block_state == YAFFS_BLOCK_STATE_COLLECTING) &&
- max_copies > 0; dev->gc_chunk++, old_chunk++) {
+ max_copies > 0;
+ dev->gc_chunk++, old_chunk++) {
if (yaffs_check_chunk_bit(dev, block, dev->gc_chunk)) {
-
- /* This page is in use and might need to be copied off */
-
+ /* Page is in use and might need to be copied */
max_copies--;
-
- mark_flash = 1;
-
- yaffs_init_tags(&tags);
-
- yaffs_rd_chunk_tags_nand(dev, old_chunk,
- buffer, &tags);
-
- object = yaffs_find_by_number(dev, tags.obj_id);
-
- yaffs_trace(YAFFS_TRACE_GC_DETAIL,
- "Collecting chunk in block %d, %d %d %d ",
- dev->gc_chunk, tags.obj_id,
- tags.chunk_id, tags.n_bytes);
-
- if (object && !yaffs_skip_verification(dev)) {
- if (tags.chunk_id == 0)
- matching_chunk =
- object->hdr_chunk;
- else if (object->soft_del)
- matching_chunk = old_chunk; /* Defeat the test */
- else
- matching_chunk =
- yaffs_find_chunk_in_file
- (object, tags.chunk_id,
- NULL);
-
- if (old_chunk != matching_chunk)
- yaffs_trace(YAFFS_TRACE_ERROR,
- "gc: page in gc mismatch: %d %d %d %d",
- old_chunk,
- matching_chunk,
- tags.obj_id,
- tags.chunk_id);
-
- }
-
- if (!object) {
- yaffs_trace(YAFFS_TRACE_ERROR,
- "page %d in gc has no object: %d %d %d ",
- old_chunk,
- tags.obj_id, tags.chunk_id,
- tags.n_bytes);
- }
-
- if (object &&
- object->deleted &&
- object->soft_del && tags.chunk_id != 0) {
- /* Data chunk in a soft deleted file, throw it away
- * It's a soft deleted data chunk,
- * No need to copy this, just forget about it and
- * fix up the object.
- */
-
- /* Free chunks already includes softdeleted chunks.
- * How ever this chunk is going to soon be really deleted
- * which will increment free chunks.
- * We have to decrement free chunks so this works out properly.
- */
- dev->n_free_chunks--;
- bi->soft_del_pages--;
-
- object->n_data_chunks--;
-
- if (object->n_data_chunks <= 0) {
- /* remeber to clean up the object */
- dev->gc_cleanup_list[dev->
- n_clean_ups]
- = tags.obj_id;
- dev->n_clean_ups++;
- }
- mark_flash = 0;
- } else if (0) {
- /* Todo object && object->deleted && object->n_data_chunks == 0 */
- /* Deleted object header with no data chunks.
- * Can be discarded and the file deleted.
- */
- object->hdr_chunk = 0;
- yaffs_free_tnode(object->my_dev,
- object->
- variant.file_variant.
- top);
- object->variant.file_variant.top = NULL;
- yaffs_generic_obj_del(object);
-
- } else if (object) {
- /* It's either a data chunk in a live file or
- * an ObjectHeader, so we're interested in it.
- * NB Need to keep the ObjectHeaders of deleted files
- * until the whole file has been deleted off
- */
- tags.serial_number++;
-
- dev->n_gc_copies++;
-
- if (tags.chunk_id == 0) {
- /* It is an object Id,
- * We need to nuke the shrinkheader flags first
- * Also need to clean up shadowing.
- * We no longer want the shrink_header flag since its work is done
- * and if it is left in place it will mess up scanning.
- */
-
- struct yaffs_obj_hdr *oh;
- oh = (struct yaffs_obj_hdr *)
- buffer;
-
- oh->is_shrink = 0;
- tags.extra_is_shrink = 0;
-
- oh->shadows_obj = 0;
- oh->inband_shadowed_obj_id = 0;
- tags.extra_shadows = 0;
-
- /* Update file size */
- if (object->variant_type ==
- YAFFS_OBJECT_TYPE_FILE) {
- oh->file_size =
- object->variant.
- file_variant.
- file_size;
- tags.extra_length =
- oh->file_size;
- }
-
- yaffs_verify_oh(object, oh,
- &tags, 1);
- new_chunk =
- yaffs_write_new_chunk(dev,
- (u8 *)
- oh,
- &tags,
- 1);
- } else {
- new_chunk =
- yaffs_write_new_chunk(dev,
- buffer,
- &tags,
- 1);
- }
-
- if (new_chunk < 0) {
- ret_val = YAFFS_FAIL;
- } else {
-
- /* Ok, now fix up the Tnodes etc. */
-
- if (tags.chunk_id == 0) {
- /* It's a header */
- object->hdr_chunk =
- new_chunk;
- object->serial =
- tags.serial_number;
- } else {
- /* It's a data chunk */
- int ok;
- ok = yaffs_put_chunk_in_file(object, tags.chunk_id, new_chunk, 0);
- }
- }
- }
-
- if (ret_val == YAFFS_OK)
- yaffs_chunk_del(dev, old_chunk,
- mark_flash, __LINE__);
-
+ ret_val = yaffs_gc_process_chunk(dev, bi,
+ old_chunk, buffer);
}
}
-
- yaffs_release_temp_buffer(dev, buffer, __LINE__);
-
+ yaffs_release_temp_buffer(dev, buffer);
}
yaffs_verify_collected_blk(dev, bi, block);
@@ -2680,12 +2603,11 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
/* Do any required cleanups */
for (i = 0; i < dev->n_clean_ups; i++) {
/* Time to delete the file too */
- object =
+ struct yaffs_obj *object =
yaffs_find_by_number(dev, dev->gc_cleanup_list[i]);
if (object) {
yaffs_free_tnode(dev,
- object->variant.
- file_variant.top);
+ object->variant.file_variant.top);
object->variant.file_variant.top = NULL;
yaffs_trace(YAFFS_TRACE_GC,
"yaffs: About to finally delete object %d",
@@ -2695,7 +2617,6 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
}
}
-
chunks_after = yaffs_get_erased_chunks(dev);
if (chunks_before >= chunks_after)
yaffs_trace(YAFFS_TRACE_GC,
@@ -2712,7 +2633,7 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
}
/*
- * FindBlockForgarbageCollection is used to select the dirtiest block (or close enough)
+ * find_gc_block() selects the dirtiest block (or close enough)
* for garbage collection.
*/
@@ -2747,8 +2668,8 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
/*
* If there is a prioritised block and none was selected then
- * this happened because there is at least one old dirty block gumming
- * up the works. Let's gc the oldest dirty block.
+ * this happened because there is at least one old dirty block
+ * gumming up the works. Let's gc the oldest dirty block.
*/
if (prioritised_exist &&
@@ -2759,9 +2680,9 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
dev->has_pending_prioritised_gc = 0;
}
- /* If we're doing aggressive GC then we are happy to take a less-dirty block, and
- * search harder.
- * else (we're doing a leasurely gc), then we only bother to do this if the
+ /* If we're doing aggressive GC then we are happy to take a less-dirty
+ * block, and search harder.
+ * else (leasurely gc), then we only bother to do this if the
* block has only a few pages in use.
*/
@@ -2797,7 +2718,8 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
for (i = 0;
i < iterations &&
(dev->gc_dirtiest < 1 ||
- dev->gc_pages_in_use > YAFFS_GC_GOOD_ENOUGH); i++) {
+ dev->gc_pages_in_use > YAFFS_GC_GOOD_ENOUGH);
+ i++) {
dev->gc_block_finder++;
if (dev->gc_block_finder < dev->internal_start_block ||
dev->gc_block_finder > dev->internal_end_block)
@@ -2810,9 +2732,9 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
if (bi->block_state == YAFFS_BLOCK_STATE_FULL &&
pages_used < dev->param.chunks_per_block &&
- (dev->gc_dirtiest < 1
- || pages_used < dev->gc_pages_in_use)
- && yaffs_block_ok_for_gc(dev, bi)) {
+ (dev->gc_dirtiest < 1 ||
+ pages_used < dev->gc_pages_in_use) &&
+ yaffs_block_ok_for_gc(dev, bi)) {
dev->gc_dirtiest = dev->gc_block_finder;
dev->gc_pages_in_use = pages_used;
}
@@ -2823,7 +2745,7 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
}
/*
- * If nothing has been selected for a while, try selecting the oldest dirty
+ * If nothing has been selected for a while, try the oldest dirty
* because that's gumming up the works.
*/
@@ -2839,7 +2761,7 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
bi->pages_in_use - bi->soft_del_pages;
} else {
dev->gc_not_done = 0;
- }
+ }
}
if (selected) {
@@ -2874,7 +2796,7 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
* If we're very low on erased blocks then we do aggressive garbage collection
* otherwise we do "leasurely" garbage collection.
* Aggressive gc looks further (whole array) and will accept less dirty blocks.
- * Passive gc only inspects smaller areas and will only accept more dirty blocks.
+ * Passive gc only inspects smaller areas and only accepts more dirty blocks.
*
* The idea is to help clear out space in a more spread-out manner.
* Dunno if it really does anything useful.
@@ -2891,13 +2813,12 @@ static int yaffs_check_gc(struct yaffs_dev *dev, int background)
if (dev->param.gc_control && (dev->param.gc_control(dev) & 1) == 0)
return YAFFS_OK;
- if (dev->gc_disable) {
+ if (dev->gc_disable)
/* Bail out so we don't get recursive gc */
return YAFFS_OK;
- }
/* This loop should pass the first time.
- * We'll only see looping here if the collection does not increase space.
+ * Only loops here if the collection does not increase space.
*/
do {
@@ -2931,7 +2852,8 @@ static int yaffs_check_gc(struct yaffs_dev *dev, int background)
dev->gc_skip = 5;
- /* If we don't already have a block being gc'd then see if we should start another */
+ /* If we don't already have a block being gc'd then see if we
+ * should start another */
if (dev->gc_block < 1 && !aggressive) {
dev->gc_block = yaffs2_find_refresh_block(dev);
@@ -2957,8 +2879,8 @@ static int yaffs_check_gc(struct yaffs_dev *dev, int background)
gc_ok = yaffs_gc_block(dev, dev->gc_block, aggressive);
}
- if (dev->n_erased_blocks < (dev->param.n_reserved_blocks)
- && dev->gc_block > 0) {
+ if (dev->n_erased_blocks < (dev->param.n_reserved_blocks) &&
+ dev->gc_block > 0) {
yaffs_trace(YAFFS_TRACE_GC,
"yaffs: GC !!!no reclaim!!! n_erased_blocks %d after try %d block %d",
dev->n_erased_blocks, max_tries,
@@ -3035,10 +2957,8 @@ void yaffs_chunk_del(struct yaffs_dev *dev, int chunk_id, int mark_flash,
if (!dev->param.is_yaffs2 && mark_flash &&
bi->block_state != YAFFS_BLOCK_STATE_COLLECTING) {
- yaffs_init_tags(&tags);
-
+ memset(&tags, 0, sizeof(tags));
tags.is_deleted = 1;
-
yaffs_wr_chunk_tags_nand(dev, chunk_id, NULL, &tags);
yaffs_handle_chunk_update(dev, chunk_id, &tags);
} else {
@@ -3050,27 +2970,23 @@ void yaffs_chunk_del(struct yaffs_dev *dev, int chunk_id, int mark_flash,
*/
if (bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING ||
bi->block_state == YAFFS_BLOCK_STATE_FULL ||
- bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCANNING ||
+ bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN ||
bi->block_state == YAFFS_BLOCK_STATE_COLLECTING) {
dev->n_free_chunks++;
-
yaffs_clear_chunk_bit(dev, block, page);
-
bi->pages_in_use--;
if (bi->pages_in_use == 0 &&
!bi->has_shrink_hdr &&
bi->block_state != YAFFS_BLOCK_STATE_ALLOCATING &&
- bi->block_state != YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
+ bi->block_state != YAFFS_BLOCK_STATE_NEEDS_SCAN) {
yaffs_block_became_dirty(dev, block);
}
-
}
-
}
static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
- const u8 * buffer, int n_bytes, int use_reserve)
+ const u8 *buffer, int n_bytes, int use_reserve)
{
/* Find old chunk Need to do this to get serial number
* Write new one and patch into tree.
@@ -3079,10 +2995,8 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
int prev_chunk_id;
struct yaffs_ext_tags prev_tags;
-
int new_chunk_id;
struct yaffs_ext_tags new_tags;
-
struct yaffs_dev *dev = in->my_dev;
yaffs_check_gc(dev, 0);
@@ -3097,7 +3011,7 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
return 0;
/* Set up new tags */
- yaffs_init_tags(&new_tags);
+ memset(&new_tags, 0, sizeof(new_tags));
new_tags.chunk_id = inode_chunk;
new_tags.obj_id = in->obj_id;
@@ -3109,7 +3023,7 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
yaffs_trace(YAFFS_TRACE_ERROR,
"Writing %d bytes to chunk!!!!!!!!!",
n_bytes);
- YBUG();
+ BUG();
}
new_chunk_id =
@@ -3130,11 +3044,10 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
static int yaffs_do_xattrib_mod(struct yaffs_obj *obj, int set,
- const YCHAR * name, const void *value, int size,
+ const YCHAR *name, const void *value, int size,
int flags)
{
struct yaffs_xattr_mod xmod;
-
int result;
xmod.set = set;
@@ -3159,7 +3072,6 @@ static int yaffs_apply_xattrib_mod(struct yaffs_obj *obj, char *buffer,
int x_offs = sizeof(struct yaffs_obj_hdr);
struct yaffs_dev *dev = obj->my_dev;
int x_size = dev->data_bytes_per_chunk - sizeof(struct yaffs_obj_hdr);
-
char *x_buffer = buffer + x_offs;
if (xmod->set)
@@ -3171,13 +3083,12 @@ static int yaffs_apply_xattrib_mod(struct yaffs_obj *obj, char *buffer,
obj->has_xattr = nval_hasvalues(x_buffer, x_size);
obj->xattr_known = 1;
-
xmod->result = retval;
return retval;
}
-static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
+static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR *name,
void *value, int size)
{
char *buffer = NULL;
@@ -3186,9 +3097,7 @@ static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
struct yaffs_dev *dev = obj->my_dev;
int x_offs = sizeof(struct yaffs_obj_hdr);
int x_size = dev->data_bytes_per_chunk - sizeof(struct yaffs_obj_hdr);
-
char *x_buffer;
-
int retval = 0;
if (obj->hdr_chunk < 1)
@@ -3204,7 +3113,7 @@ static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
return 0;
}
- buffer = (char *)yaffs_get_temp_buffer(dev, __LINE__);
+ buffer = (char *)yaffs_get_temp_buffer(dev);
if (!buffer)
return -ENOMEM;
@@ -3226,7 +3135,7 @@ static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
else
retval = nval_list(x_buffer, x_size, value, size);
}
- yaffs_release_temp_buffer(dev, (u8 *) buffer, __LINE__);
+ yaffs_release_temp_buffer(dev, (u8 *) buffer);
return retval;
}
@@ -3254,44 +3163,38 @@ int yaffs_list_xattrib(struct yaffs_obj *obj, char *buffer, int size)
static void yaffs_check_obj_details_loaded(struct yaffs_obj *in)
{
- u8 *chunk_data;
+ u8 *buf;
struct yaffs_obj_hdr *oh;
struct yaffs_dev *dev;
struct yaffs_ext_tags tags;
int result;
int alloc_failed = 0;
- if (!in)
+ if (!in || !in->lazy_loaded || in->hdr_chunk < 1)
return;
dev = in->my_dev;
+ in->lazy_loaded = 0;
+ buf = yaffs_get_temp_buffer(dev);
- if (in->lazy_loaded && in->hdr_chunk > 0) {
- in->lazy_loaded = 0;
- chunk_data = yaffs_get_temp_buffer(dev, __LINE__);
-
- result =
- yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, chunk_data,
- &tags);
- oh = (struct yaffs_obj_hdr *)chunk_data;
+ result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
+ oh = (struct yaffs_obj_hdr *)buf;
- in->yst_mode = oh->yst_mode;
- yaffs_load_attribs(in, oh);
- yaffs_set_obj_name_from_oh(in, oh);
+ in->yst_mode = oh->yst_mode;
+ yaffs_load_attribs(in, oh);
+ yaffs_set_obj_name_from_oh(in, oh);
- if (in->variant_type == YAFFS_OBJECT_TYPE_SYMLINK) {
- in->variant.symlink_variant.alias =
- yaffs_clone_str(oh->alias);
- if (!in->variant.symlink_variant.alias)
- alloc_failed = 1; /* Not returned to caller */
- }
-
- yaffs_release_temp_buffer(dev, chunk_data, __LINE__);
+ if (in->variant_type == YAFFS_OBJECT_TYPE_SYMLINK) {
+ in->variant.symlink_variant.alias =
+ yaffs_clone_str(oh->alias);
+ if (!in->variant.symlink_variant.alias)
+ alloc_failed = 1; /* Not returned */
}
+ yaffs_release_temp_buffer(dev, buf);
}
-static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR * name,
- const YCHAR * oh_name, int buff_size)
+static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR *name,
+ const YCHAR *oh_name, int buff_size)
{
#ifdef CONFIG_YAFFS_AUTO_UNICODE
if (dev->param.auto_unicode) {
@@ -3308,17 +3211,17 @@ static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR * name,
}
} else {
strncpy(name, oh_name + 1, buff_size - 1);
- }
+ }
} else {
#else
- {
+ {
#endif
strncpy(name, oh_name, buff_size - 1);
- }
+ }
}
-static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR * oh_name,
- const YCHAR * name)
+static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR *oh_name,
+ const YCHAR *name)
{
#ifdef CONFIG_YAFFS_AUTO_UNICODE
@@ -3338,7 +3241,7 @@ static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR * oh_name,
}
if (is_ascii) {
- /* It is an ASCII name, so do a unicode to ascii conversion */
+ /* It is an ASCII name, so convert unicode to ascii */
char *ascii_oh_name = (char *)oh_name;
int n = YAFFS_MAX_NAME_LENGTH - 1;
while (n > 0 && *name) {
@@ -3348,180 +3251,163 @@ static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR * oh_name,
n--;
}
} else {
- /* It is a unicode name, so save starting at the second YCHAR */
+ /* Unicode name, so save starting at the second YCHAR */
*oh_name = 0;
- strncpy(oh_name + 1, name,
- YAFFS_MAX_NAME_LENGTH - 2);
+ strncpy(oh_name + 1, name, YAFFS_MAX_NAME_LENGTH - 2);
}
} else {
#else
- {
+ {
#endif
strncpy(oh_name, name, YAFFS_MAX_NAME_LENGTH - 1);
- }
-
+ }
}
/* UpdateObjectHeader updates the header on NAND for an object.
* If name is not NULL, then that new name is used.
*/
-int yaffs_update_oh(struct yaffs_obj *in, const YCHAR * name, int force,
+int yaffs_update_oh(struct yaffs_obj *in, const YCHAR *name, int force,
int is_shrink, int shadows, struct yaffs_xattr_mod *xmod)
{
struct yaffs_block_info *bi;
-
struct yaffs_dev *dev = in->my_dev;
-
int prev_chunk_id;
int ret_val = 0;
int result = 0;
-
int new_chunk_id;
struct yaffs_ext_tags new_tags;
struct yaffs_ext_tags old_tags;
const YCHAR *alias = NULL;
-
u8 *buffer = NULL;
YCHAR old_name[YAFFS_MAX_NAME_LENGTH + 1];
-
struct yaffs_obj_hdr *oh = NULL;
strcpy(old_name, _Y("silly old name"));
- if (!in->fake || in == dev->root_dir ||
- force || xmod) {
-
- yaffs_check_gc(dev, 0);
- yaffs_check_obj_details_loaded(in);
-
- buffer = yaffs_get_temp_buffer(in->my_dev, __LINE__);
- oh = (struct yaffs_obj_hdr *)buffer;
-
- prev_chunk_id = in->hdr_chunk;
-
- if (prev_chunk_id > 0) {
- result = yaffs_rd_chunk_tags_nand(dev, prev_chunk_id,
- buffer, &old_tags);
-
- yaffs_verify_oh(in, oh, &old_tags, 0);
-
- memcpy(old_name, oh->name, sizeof(oh->name));
- memset(buffer, 0xFF, sizeof(struct yaffs_obj_hdr));
- } else {
- memset(buffer, 0xFF, dev->data_bytes_per_chunk);
- }
-
- oh->type = in->variant_type;
- oh->yst_mode = in->yst_mode;
- oh->shadows_obj = oh->inband_shadowed_obj_id = shadows;
+ if (in->fake && in != dev->root_dir && !force && !xmod)
+ return ret_val;
- yaffs_load_attribs_oh(oh, in);
+ yaffs_check_gc(dev, 0);
+ yaffs_check_obj_details_loaded(in);
- if (in->parent)
- oh->parent_obj_id = in->parent->obj_id;
- else
- oh->parent_obj_id = 0;
+ buffer = yaffs_get_temp_buffer(in->my_dev);
+ oh = (struct yaffs_obj_hdr *)buffer;
- if (name && *name) {
- memset(oh->name, 0, sizeof(oh->name));
- yaffs_load_oh_from_name(dev, oh->name, name);
- } else if (prev_chunk_id > 0) {
- memcpy(oh->name, old_name, sizeof(oh->name));
- } else {
- memset(oh->name, 0, sizeof(oh->name));
- }
+ prev_chunk_id = in->hdr_chunk;
- oh->is_shrink = is_shrink;
+ if (prev_chunk_id > 0) {
+ result = yaffs_rd_chunk_tags_nand(dev, prev_chunk_id,
+ buffer, &old_tags);
- switch (in->variant_type) {
- case YAFFS_OBJECT_TYPE_UNKNOWN:
- /* Should not happen */
- break;
- case YAFFS_OBJECT_TYPE_FILE:
- oh->file_size =
- (oh->parent_obj_id == YAFFS_OBJECTID_DELETED
- || oh->parent_obj_id ==
- YAFFS_OBJECTID_UNLINKED) ? 0 : in->
- variant.file_variant.file_size;
- break;
- case YAFFS_OBJECT_TYPE_HARDLINK:
- oh->equiv_id = in->variant.hardlink_variant.equiv_id;
- break;
- case YAFFS_OBJECT_TYPE_SPECIAL:
- /* Do nothing */
- break;
- case YAFFS_OBJECT_TYPE_DIRECTORY:
- /* Do nothing */
- break;
- case YAFFS_OBJECT_TYPE_SYMLINK:
- alias = in->variant.symlink_variant.alias;
- if (!alias)
- alias = _Y("no alias");
- strncpy(oh->alias, alias, YAFFS_MAX_ALIAS_LENGTH);
- oh->alias[YAFFS_MAX_ALIAS_LENGTH] = 0;
- break;
- }
+ yaffs_verify_oh(in, oh, &old_tags, 0);
+ memcpy(old_name, oh->name, sizeof(oh->name));
+ memset(buffer, 0xff, sizeof(struct yaffs_obj_hdr));
+ } else {
+ memset(buffer, 0xff, dev->data_bytes_per_chunk);
+ }
- /* process any xattrib modifications */
- if (xmod)
- yaffs_apply_xattrib_mod(in, (char *)buffer, xmod);
+ oh->type = in->variant_type;
+ oh->yst_mode = in->yst_mode;
+ oh->shadows_obj = oh->inband_shadowed_obj_id = shadows;
- /* Tags */
- yaffs_init_tags(&new_tags);
- in->serial++;
- new_tags.chunk_id = 0;
- new_tags.obj_id = in->obj_id;
- new_tags.serial_number = in->serial;
+ yaffs_load_attribs_oh(oh, in);
- /* Add extra info for file header */
+ if (in->parent)
+ oh->parent_obj_id = in->parent->obj_id;
+ else
+ oh->parent_obj_id = 0;
- new_tags.extra_available = 1;
- new_tags.extra_parent_id = oh->parent_obj_id;
- new_tags.extra_length = oh->file_size;
- new_tags.extra_is_shrink = oh->is_shrink;
- new_tags.extra_equiv_id = oh->equiv_id;
- new_tags.extra_shadows = (oh->shadows_obj > 0) ? 1 : 0;
- new_tags.extra_obj_type = in->variant_type;
+ if (name && *name) {
+ memset(oh->name, 0, sizeof(oh->name));
+ yaffs_load_oh_from_name(dev, oh->name, name);
+ } else if (prev_chunk_id > 0) {
+ memcpy(oh->name, old_name, sizeof(oh->name));
+ } else {
+ memset(oh->name, 0, sizeof(oh->name));
+ }
- yaffs_verify_oh(in, oh, &new_tags, 1);
+ oh->is_shrink = is_shrink;
- /* Create new chunk in NAND */
- new_chunk_id =
- yaffs_write_new_chunk(dev, buffer, &new_tags,
- (prev_chunk_id > 0) ? 1 : 0);
+ switch (in->variant_type) {
+ case YAFFS_OBJECT_TYPE_UNKNOWN:
+ /* Should not happen */
+ break;
+ case YAFFS_OBJECT_TYPE_FILE:
+ oh->file_size =
+ (oh->parent_obj_id == YAFFS_OBJECTID_DELETED ||
+ oh->parent_obj_id == YAFFS_OBJECTID_UNLINKED) ?
+ 0 : in->variant.file_variant.file_size;
+ break;
+ case YAFFS_OBJECT_TYPE_HARDLINK:
+ oh->equiv_id = in->variant.hardlink_variant.equiv_id;
+ break;
+ case YAFFS_OBJECT_TYPE_SPECIAL:
+ /* Do nothing */
+ break;
+ case YAFFS_OBJECT_TYPE_DIRECTORY:
+ /* Do nothing */
+ break;
+ case YAFFS_OBJECT_TYPE_SYMLINK:
+ alias = in->variant.symlink_variant.alias;
+ if (!alias)
+ alias = _Y("no alias");
+ strncpy(oh->alias, alias, YAFFS_MAX_ALIAS_LENGTH);
+ oh->alias[YAFFS_MAX_ALIAS_LENGTH] = 0;
+ break;
+ }
- if (new_chunk_id >= 0) {
+ /* process any xattrib modifications */
+ if (xmod)
+ yaffs_apply_xattrib_mod(in, (char *)buffer, xmod);
- in->hdr_chunk = new_chunk_id;
+ /* Tags */
+ memset(&new_tags, 0, sizeof(new_tags));
+ in->serial++;
+ new_tags.chunk_id = 0;
+ new_tags.obj_id = in->obj_id;
+ new_tags.serial_number = in->serial;
+
+ /* Add extra info for file header */
+ new_tags.extra_available = 1;
+ new_tags.extra_parent_id = oh->parent_obj_id;
+ new_tags.extra_length = oh->file_size;
+ new_tags.extra_is_shrink = oh->is_shrink;
+ new_tags.extra_equiv_id = oh->equiv_id;
+ new_tags.extra_shadows = (oh->shadows_obj > 0) ? 1 : 0;
+ new_tags.extra_obj_type = in->variant_type;
+ yaffs_verify_oh(in, oh, &new_tags, 1);
+
+ /* Create new chunk in NAND */
+ new_chunk_id =
+ yaffs_write_new_chunk(dev, buffer, &new_tags,
+ (prev_chunk_id > 0) ? 1 : 0);
- if (prev_chunk_id > 0) {
- yaffs_chunk_del(dev, prev_chunk_id, 1,
- __LINE__);
- }
+ if (buffer)
+ yaffs_release_temp_buffer(dev, buffer);
- if (!yaffs_obj_cache_dirty(in))
- in->dirty = 0;
+ if (new_chunk_id < 0)
+ return new_chunk_id;
- /* If this was a shrink, then mark the block that the chunk lives on */
- if (is_shrink) {
- bi = yaffs_get_block_info(in->my_dev,
- new_chunk_id /
- in->my_dev->param.
- chunks_per_block);
- bi->has_shrink_hdr = 1;
- }
+ in->hdr_chunk = new_chunk_id;
- }
+ if (prev_chunk_id > 0)
+ yaffs_chunk_del(dev, prev_chunk_id, 1, __LINE__);
- ret_val = new_chunk_id;
+ if (!yaffs_obj_cache_dirty(in))
+ in->dirty = 0;
+ /* If this was a shrink, then mark the block
+ * that the chunk lives on */
+ if (is_shrink) {
+ bi = yaffs_get_block_info(in->my_dev,
+ new_chunk_id /
+ in->my_dev->param.chunks_per_block);
+ bi->has_shrink_hdr = 1;
}
- if (buffer)
- yaffs_release_temp_buffer(dev, buffer, __LINE__);
- return ret_val;
+ return new_chunk_id;
}
/*--------------------- File read/write ------------------------
@@ -3536,21 +3422,17 @@ int yaffs_update_oh(struct yaffs_obj *in, const YCHAR * name, int force,
int yaffs_file_rd(struct yaffs_obj *in, u8 * buffer, loff_t offset, int n_bytes)
{
-
int chunk;
u32 start;
int n_copy;
int n = n_bytes;
int n_done = 0;
struct yaffs_cache *cache;
-
struct yaffs_dev *dev;
dev = in->my_dev;
while (n > 0) {
- /* chunk = offset / dev->data_bytes_per_chunk + 1; */
- /* start = offset % dev->data_bytes_per_chunk; */
yaffs_addr_to_chunk(dev, offset, &chunk, &start);
chunk++;
@@ -3564,15 +3446,16 @@ int yaffs_file_rd(struct yaffs_obj *in, u8 * buffer, loff_t offset, int n_bytes)
cache = yaffs_find_chunk_cache(in, chunk);
- /* If the chunk is already in the cache or it is less than a whole chunk
- * or we're using inband tags then use the cache (if there is caching)
- * else bypass the cache.
+ /* If the chunk is already in the cache or it is less than
+ * a whole chunk or we're using inband tags then use the cache
+ * (if there is caching) else bypass the cache.
*/
- if (cache || n_copy != dev->data_bytes_per_chunk
- || dev->param.inband_tags) {
+ if (cache || n_copy != dev->data_bytes_per_chunk ||
+ dev->param.inband_tags) {
if (dev->param.n_caches > 0) {
- /* If we can't find the data in the cache, then load it up. */
+ /* If we can't find the data in the cache,
+ * then load it up. */
if (!cache) {
cache =
@@ -3597,33 +3480,26 @@ int yaffs_file_rd(struct yaffs_obj *in, u8 * buffer, loff_t offset, int n_bytes)
/* Read into the local buffer then copy.. */
u8 *local_buffer =
- yaffs_get_temp_buffer(dev, __LINE__);
+ yaffs_get_temp_buffer(dev);
yaffs_rd_data_obj(in, chunk, local_buffer);
memcpy(buffer, &local_buffer[start], n_copy);
- yaffs_release_temp_buffer(dev, local_buffer,
- __LINE__);
+ yaffs_release_temp_buffer(dev, local_buffer);
}
-
} else {
-
- /* A full chunk. Read directly into the supplied buffer. */
+ /* A full chunk. Read directly into the buffer. */
yaffs_rd_data_obj(in, chunk, buffer);
-
}
-
n -= n_copy;
offset += n_copy;
buffer += n_copy;
n_done += n_copy;
-
}
-
return n_done;
}
-int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
+int yaffs_do_file_wr(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
int n_bytes, int write_trhrough)
{
@@ -3637,7 +3513,6 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
int chunk_written = 0;
u32 n_bytes_read;
u32 chunk_start;
-
struct yaffs_dev *dev;
dev = in->my_dev;
@@ -3660,9 +3535,10 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
if ((start + n) < dev->data_bytes_per_chunk) {
n_copy = n;
- /* Now folks, to calculate how many bytes to write back....
- * If we're overwriting and not writing to then end of file then
- * we need to write back as much as was there before.
+ /* Now calculate how many bytes to write back....
+ * If we're overwriting and not writing to then end of
+ * file then we need to write back as much as was there
+ * before.
*/
chunk_start = ((chunk - 1) * dev->data_bytes_per_chunk);
@@ -3681,27 +3557,30 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
(n_bytes_read >
(start + n)) ? n_bytes_read : (start + n);
- if (n_writeback < 0
- || n_writeback > dev->data_bytes_per_chunk)
- YBUG();
+ if (n_writeback < 0 ||
+ n_writeback > dev->data_bytes_per_chunk)
+ BUG();
} else {
n_copy = dev->data_bytes_per_chunk - start;
n_writeback = dev->data_bytes_per_chunk;
}
- if (n_copy != dev->data_bytes_per_chunk
- || dev->param.inband_tags) {
- /* An incomplete start or end chunk (or maybe both start and end chunk),
- * or we're using inband tags, so we want to use the cache buffers.
+ if (n_copy != dev->data_bytes_per_chunk ||
+ dev->param.inband_tags) {
+ /* An incomplete start or end chunk (or maybe both
+ * start and end chunk), or we're using inband tags,
+ * so we want to use the cache buffers.
*/
if (dev->param.n_caches > 0) {
struct yaffs_cache *cache;
- /* If we can't find the data in the cache, then load the cache */
+
+ /* If we can't find the data in the cache, then
+ * load the cache */
cache = yaffs_find_chunk_cache(in, chunk);
- if (!cache
- && yaffs_check_alloc_available(dev, 1)) {
+ if (!cache &&
+ yaffs_check_alloc_available(dev, 1)) {
cache = yaffs_grab_chunk_cache(dev);
cache->object = in;
cache->chunk_id = chunk;
@@ -3713,8 +3592,9 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
!cache->dirty &&
!yaffs_check_alloc_available(dev,
1)) {
- /* Drop the cache if it was a read cache item and
- * no space check has been made for it.
+ /* Drop the cache if it was a read cache
+ * item and no space check has been made
+ * for it.
*/
cache = NULL;
}
@@ -3738,20 +3618,18 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
cache->n_bytes, 1);
cache->dirty = 0;
}
-
} else {
- chunk_written = -1; /* fail the write */
+ chunk_written = -1; /* fail write */
}
} else {
- /* An incomplete start or end chunk (or maybe both start and end chunk)
- * Read into the local buffer then copy, then copy over and write back.
+ /* An incomplete start or end chunk (or maybe
+ * both start and end chunk). Read into the
+ * local buffer then copy over and write back.
*/
- u8 *local_buffer =
- yaffs_get_temp_buffer(dev, __LINE__);
+ u8 *local_buffer = yaffs_get_temp_buffer(dev);
yaffs_rd_data_obj(in, chunk, local_buffer);
-
memcpy(&local_buffer[start], buffer, n_copy);
chunk_written =
@@ -3759,19 +3637,17 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
local_buffer,
n_writeback, 0);
- yaffs_release_temp_buffer(dev, local_buffer,
- __LINE__);
-
+ yaffs_release_temp_buffer(dev, local_buffer);
}
-
} else {
- /* A full chunk. Write directly from the supplied buffer. */
+ /* A full chunk. Write directly from the buffer. */
chunk_written =
yaffs_wr_data_obj(in, chunk, buffer,
dev->data_bytes_per_chunk, 0);
- /* Since we've overwritten the cached data, we better invalidate it. */
+ /* Since we've overwritten the cached data,
+ * we better invalidate it. */
yaffs_invalidate_chunk_cache(in, chunk);
}
@@ -3781,7 +3657,6 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
buffer += n_copy;
n_done += n_copy;
}
-
}
/* Update file object */
@@ -3790,11 +3665,10 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
in->variant.file_variant.file_size = (start_write + n_done);
in->dirty = 1;
-
return n_done;
}
-int yaffs_wr_file(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
+int yaffs_wr_file(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
int n_bytes, int write_trhrough)
{
yaffs2_handle_hole(in, offset);
@@ -3808,13 +3682,12 @@ static void yaffs_prune_chunks(struct yaffs_obj *in, int new_size)
struct yaffs_dev *dev = in->my_dev;
int old_size = in->variant.file_variant.file_size;
-
+ int i;
+ int chunk_id;
int last_del = 1 + (old_size - 1) / dev->data_bytes_per_chunk;
-
int start_del = 1 + (new_size + dev->data_bytes_per_chunk - 1) /
dev->data_bytes_per_chunk;
- int i;
- int chunk_id;
+
/* Delete backwards so that we don't end up with holes if
* power is lost part-way through the operation.
@@ -3826,23 +3699,23 @@ static void yaffs_prune_chunks(struct yaffs_obj *in, int new_size)
*/
chunk_id = yaffs_find_del_file_chunk(in, i, NULL);
- if (chunk_id > 0) {
- if (chunk_id <
- (dev->internal_start_block *
- dev->param.chunks_per_block)
- || chunk_id >=
- ((dev->internal_end_block +
- 1) * dev->param.chunks_per_block)) {
- yaffs_trace(YAFFS_TRACE_ALWAYS,
- "Found daft chunk_id %d for %d",
- chunk_id, i);
- } else {
- in->n_data_chunks--;
- yaffs_chunk_del(dev, chunk_id, 1, __LINE__);
- }
+
+ if (chunk_id < 1)
+ continue;
+
+ if (chunk_id <
+ (dev->internal_start_block * dev->param.chunks_per_block) ||
+ chunk_id >=
+ ((dev->internal_end_block + 1) *
+ dev->param.chunks_per_block)) {
+ yaffs_trace(YAFFS_TRACE_ALWAYS,
+ "Found daft chunk_id %d for %d",
+ chunk_id, i);
+ } else {
+ in->n_data_chunks--;
+ yaffs_chunk_del(dev, chunk_id, 1, __LINE__);
}
}
-
}
void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size)
@@ -3857,7 +3730,7 @@ void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size)
if (new_partial != 0) {
int last_chunk = 1 + new_full;
- u8 *local_buffer = yaffs_get_temp_buffer(dev, __LINE__);
+ u8 *local_buffer = yaffs_get_temp_buffer(dev);
/* Rewrite the last chunk with its new size and zero pad */
yaffs_rd_data_obj(obj, last_chunk, local_buffer);
@@ -3867,7 +3740,7 @@ void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size)
yaffs_wr_data_obj(obj, last_chunk, local_buffer,
new_partial, 1);
- yaffs_release_temp_buffer(dev, local_buffer, __LINE__);
+ yaffs_release_temp_buffer(dev, local_buffer);
}
obj->variant.file_variant.file_size = new_size;
@@ -3915,24 +3788,19 @@ int yaffs_resize_file(struct yaffs_obj *in, loff_t new_size)
int yaffs_flush_file(struct yaffs_obj *in, int update_time, int data_sync)
{
- int ret_val;
- if (in->dirty) {
- yaffs_flush_file_cache(in);
- if (data_sync) /* Only sync data */
- ret_val = YAFFS_OK;
- else {
- if (update_time)
- yaffs_load_current_time(in, 0, 0);
+ if (!in->dirty)
+ return YAFFS_OK;
- ret_val = (yaffs_update_oh(in, NULL, 0, 0, 0, NULL) >=
- 0) ? YAFFS_OK : YAFFS_FAIL;
- }
- } else {
- ret_val = YAFFS_OK;
- }
+ yaffs_flush_file_cache(in);
- return ret_val;
+ if (data_sync)
+ return YAFFS_OK;
+
+ if (update_time)
+ yaffs_load_current_time(in, 0, 0);
+ return (yaffs_update_oh(in, NULL, 0, 0, 0, NULL) >= 0) ?
+ YAFFS_OK : YAFFS_FAIL;
}
@@ -3942,7 +3810,6 @@ int yaffs_flush_file(struct yaffs_obj *in, int update_time, int data_sync)
*/
static int yaffs_unlink_file_if_needed(struct yaffs_obj *in)
{
-
int ret_val;
int del_now = 0;
struct yaffs_dev *dev = in->my_dev;
@@ -3967,14 +3834,13 @@ static int yaffs_unlink_file_if_needed(struct yaffs_obj *in)
yaffs_change_obj_name(in, in->my_dev->unlinked_dir,
_Y("unlinked"), 0, 0);
}
-
return ret_val;
}
int yaffs_del_file(struct yaffs_obj *in)
{
int ret_val = YAFFS_OK;
- int deleted; /* Need to cache value on stack if in is freed */
+ int deleted; /* Need to cache value on stack if in is freed */
struct yaffs_dev *dev = in->my_dev;
if (dev->param.disable_soft_del || dev->param.is_yaffs2)
@@ -4009,8 +3875,8 @@ int yaffs_del_file(struct yaffs_obj *in)
int yaffs_is_non_empty_dir(struct yaffs_obj *obj)
{
return (obj &&
- obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY) &&
- !(list_empty(&obj->variant.dir_variant.children));
+ obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY) &&
+ !(list_empty(&obj->variant.dir_variant.children));
}
static int yaffs_del_dir(struct yaffs_obj *obj)
@@ -4024,8 +3890,7 @@ static int yaffs_del_dir(struct yaffs_obj *obj)
static int yaffs_del_symlink(struct yaffs_obj *in)
{
- if (in->variant.symlink_variant.alias)
- kfree(in->variant.symlink_variant.alias);
+ kfree(in->variant.symlink_variant.alias);
in->variant.symlink_variant.alias = NULL;
return yaffs_generic_obj_del(in);
@@ -4033,7 +3898,7 @@ static int yaffs_del_symlink(struct yaffs_obj *in)
static int yaffs_del_link(struct yaffs_obj *in)
{
- /* remove this hardlink from the list assocaited with the equivalent
+ /* remove this hardlink from the list associated with the equivalent
* object
*/
list_del_init(&in->hard_links);
@@ -4043,6 +3908,7 @@ static int yaffs_del_link(struct yaffs_obj *in)
int yaffs_del_obj(struct yaffs_obj *obj)
{
int ret_val = -1;
+
switch (obj->variant_type) {
case YAFFS_OBJECT_TYPE_FILE:
ret_val = yaffs_del_file(obj);
@@ -4069,17 +3935,15 @@ int yaffs_del_obj(struct yaffs_obj *obj)
ret_val = 0;
break; /* should not happen. */
}
-
return ret_val;
}
static int yaffs_unlink_worker(struct yaffs_obj *obj)
{
-
int del_now = 0;
- if(!obj)
- return YAFFS_FAIL;
+ if (!obj)
+ return YAFFS_FAIL;
if (!obj->my_inode)
del_now = 1;
@@ -4098,7 +3962,7 @@ static int yaffs_unlink_worker(struct yaffs_obj *obj)
* Instead, we do the following:
* - Select a hardlink.
* - Unhook it from the hard links
- * - Move it from its parent directory (so that the rename can work)
+ * - Move it from its parent directory so that the rename works.
* - Rename the object to the hardlink's name.
* - Delete the hardlink
*/
@@ -4149,21 +4013,19 @@ static int yaffs_unlink_worker(struct yaffs_obj *obj)
return YAFFS_FAIL;
} else {
return yaffs_change_obj_name(obj, obj->my_dev->unlinked_dir,
- _Y("unlinked"), 0, 0);
- }
+ _Y("unlinked"), 0, 0);
+ }
}
static int yaffs_unlink_obj(struct yaffs_obj *obj)
{
-
if (obj && obj->unlink_allowed)
return yaffs_unlink_worker(obj);
return YAFFS_FAIL;
-
}
-int yaffs_unlinker(struct yaffs_obj *dir, const YCHAR * name)
+int yaffs_unlinker(struct yaffs_obj *dir, const YCHAR *name)
{
struct yaffs_obj *obj;
@@ -4174,8 +4036,8 @@ int yaffs_unlinker(struct yaffs_obj *dir, const YCHAR * name)
/* Note:
* If old_name is NULL then we take old_dir as the object to be renamed.
*/
-int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
- struct yaffs_obj *new_dir, const YCHAR * new_name)
+int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR *old_name,
+ struct yaffs_obj *new_dir, const YCHAR *new_name)
{
struct yaffs_obj *obj = NULL;
struct yaffs_obj *existing_target = NULL;
@@ -4183,10 +4045,14 @@ int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
int result;
struct yaffs_dev *dev;
- if (!old_dir || old_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
- YBUG();
- if (!new_dir || new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
- YBUG();
+ if (!old_dir || old_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
+ BUG();
+ return YAFFS_FAIL;
+ }
+ if (!new_dir || new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
+ BUG();
+ return YAFFS_FAIL;
+ }
dev = old_dir->my_dev;
@@ -4195,8 +4061,8 @@ int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
* While look-up is case insensitive, the name isn't.
* Therefore we might want to change x.txt to X.txt
*/
- if (old_dir == new_dir &&
- old_name && new_name &&
+ if (old_dir == new_dir &&
+ old_name && new_name &&
strcmp(old_name, new_name) == 0)
force = 1;
#endif
@@ -4206,26 +4072,24 @@ int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
/* ENAMETOOLONG */
return YAFFS_FAIL;
- if(old_name)
+ if (old_name)
obj = yaffs_find_by_name(old_dir, old_name);
else{
obj = old_dir;
old_dir = obj->parent;
}
-
if (obj && obj->rename_allowed) {
-
- /* Now do the handling for an existing target, if there is one */
-
+ /* Now handle an existing target, if there is one */
existing_target = yaffs_find_by_name(new_dir, new_name);
- if (yaffs_is_non_empty_dir(existing_target)){
+ if (yaffs_is_non_empty_dir(existing_target)) {
return YAFFS_FAIL; /* ENOTEMPTY */
} else if (existing_target && existing_target != obj) {
/* Nuke the target first, using shadowing,
* but only if it isn't the same object.
*
- * Note we must disable gc otherwise it can mess up the shadowing.
+ * Note we must disable gc here otherwise it can mess
+ * up the shadowing.
*
*/
dev->gc_disable = 1;
@@ -4254,12 +4118,7 @@ void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
{
struct yaffs_obj *obj;
- if (!backward_scanning) {
- /* Handle YAFFS1 forward scanning case
- * For YAFFS1 we always do the deletion
- */
-
- } else {
+ if (backward_scanning) {
/* Handle YAFFS2 case (backward scanning)
* If the shadowed object exists then ignore.
*/
@@ -4268,7 +4127,8 @@ void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
return;
}
- /* Let's create it (if it does not exist) assuming it is a file so that it can do shrinking etc.
+ /* Let's create it (if it does not exist) assuming it is a file so that
+ * it can do shrinking etc.
* We put it in unlinked dir to be cleaned up after the scanning
*/
obj =
@@ -4278,22 +4138,20 @@ void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
obj->is_shadowed = 1;
yaffs_add_obj_to_dir(dev->unlinked_dir, obj);
obj->variant.file_variant.shrink_size = 0;
- obj->valid = 1; /* So that we don't read any other info for this file */
-
+ obj->valid = 1; /* So that we don't read any other info. */
}
-void yaffs_link_fixup(struct yaffs_dev *dev, struct yaffs_obj *hard_list)
+void yaffs_link_fixup(struct yaffs_dev *dev, struct list_head *hard_list)
{
+ struct list_head *lh;
+ struct list_head *save;
struct yaffs_obj *hl;
struct yaffs_obj *in;
- while (hard_list) {
- hl = hard_list;
- hard_list = (struct yaffs_obj *)(hard_list->hard_links.next);
-
+ list_for_each_safe(lh, save, hard_list) {
+ hl = list_entry(lh, struct yaffs_obj, hard_links);
in = yaffs_find_by_number(dev,
- hl->variant.
- hardlink_variant.equiv_id);
+ hl->variant.hardlink_variant.equiv_id);
if (in) {
/* Add the hardlink pointers */
@@ -4305,7 +4163,6 @@ void yaffs_link_fixup(struct yaffs_dev *dev, struct yaffs_obj *hard_list)
*/
hl->variant.hardlink_variant.equiv_obj = NULL;
INIT_LIST_HEAD(&hl->hard_links);
-
}
}
}
@@ -4325,19 +4182,14 @@ static void yaffs_strip_deleted_objs(struct yaffs_dev *dev)
/* Soft delete all the unlinked files */
list_for_each_safe(i, n,
&dev->unlinked_dir->variant.dir_variant.children) {
- if (i) {
- l = list_entry(i, struct yaffs_obj, siblings);
- yaffs_del_obj(l);
- }
+ l = list_entry(i, struct yaffs_obj, siblings);
+ yaffs_del_obj(l);
}
list_for_each_safe(i, n, &dev->del_dir->variant.dir_variant.children) {
- if (i) {
- l = list_entry(i, struct yaffs_obj, siblings);
- yaffs_del_obj(l);
- }
+ l = list_entry(i, struct yaffs_obj, siblings);
+ yaffs_del_obj(l);
}
-
}
/*
@@ -4348,13 +4200,14 @@ static void yaffs_strip_deleted_objs(struct yaffs_dev *dev)
* - Directly or indirectly under root.
*
* Note:
- * This code assumes that we don't ever change the current relationships between
- * directories:
+ * This code assumes that we don't ever change the current relationships
+ * between directories:
* root_dir->parent == unlinked_dir->parent == del_dir->parent == NULL
* lost-n-found->parent == root_dir
*
- * This fixes the problem where directories might have inadvertently been deleted
- * leaving the object "hanging" without being rooted in the directory tree.
+ * This fixes the problem where directories might have inadvertently been
+ * deleted leaving the object "hanging" without being rooted in the
+ * directory tree.
*/
static int yaffs_has_null_parent(struct yaffs_dev *dev, struct yaffs_obj *obj)
@@ -4383,45 +4236,42 @@ static void yaffs_fix_hanging_objs(struct yaffs_dev *dev)
for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
list_for_each_safe(lh, n, &dev->obj_bucket[i].list) {
- if (lh) {
- obj =
- list_entry(lh, struct yaffs_obj, hash_link);
- parent = obj->parent;
-
- if (yaffs_has_null_parent(dev, obj)) {
- /* These directories are not hanging */
- hanging = 0;
- } else if (!parent
- || parent->variant_type !=
- YAFFS_OBJECT_TYPE_DIRECTORY) {
- hanging = 1;
- } else if (yaffs_has_null_parent(dev, parent)) {
- hanging = 0;
- } else {
- /*
- * Need to follow the parent chain to see if it is hanging.
- */
- hanging = 0;
- depth_limit = 100;
-
- while (parent != dev->root_dir &&
- parent->parent &&
- parent->parent->variant_type ==
- YAFFS_OBJECT_TYPE_DIRECTORY
- && depth_limit > 0) {
- parent = parent->parent;
- depth_limit--;
- }
- if (parent != dev->root_dir)
- hanging = 1;
- }
- if (hanging) {
- yaffs_trace(YAFFS_TRACE_SCAN,
- "Hanging object %d moved to lost and found",
- obj->obj_id);
- yaffs_add_obj_to_dir(dev->lost_n_found,
- obj);
+ obj = list_entry(lh, struct yaffs_obj, hash_link);
+ parent = obj->parent;
+
+ if (yaffs_has_null_parent(dev, obj)) {
+ /* These directories are not hanging */
+ hanging = 0;
+ } else if (!parent ||
+ parent->variant_type !=
+ YAFFS_OBJECT_TYPE_DIRECTORY) {
+ hanging = 1;
+ } else if (yaffs_has_null_parent(dev, parent)) {
+ hanging = 0;
+ } else {
+ /*
+ * Need to follow the parent chain to
+ * see if it is hanging.
+ */
+ hanging = 0;
+ depth_limit = 100;
+
+ while (parent != dev->root_dir &&
+ parent->parent &&
+ parent->parent->variant_type ==
+ YAFFS_OBJECT_TYPE_DIRECTORY &&
+ depth_limit > 0) {
+ parent = parent->parent;
+ depth_limit--;
}
+ if (parent != dev->root_dir)
+ hanging = 1;
+ }
+ if (hanging) {
+ yaffs_trace(YAFFS_TRACE_SCAN,
+ "Hanging object %d moved to lost and found",
+ obj->obj_id);
+ yaffs_add_obj_to_dir(dev->lost_n_found, obj);
}
}
}
@@ -4437,25 +4287,17 @@ static void yaffs_del_dir_contents(struct yaffs_obj *dir)
struct list_head *n;
if (dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
- YBUG();
+ BUG();
list_for_each_safe(lh, n, &dir->variant.dir_variant.children) {
- if (lh) {
- obj = list_entry(lh, struct yaffs_obj, siblings);
- if (obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY)
- yaffs_del_dir_contents(obj);
-
- yaffs_trace(YAFFS_TRACE_SCAN,
- "Deleting lost_found object %d",
- obj->obj_id);
-
- /* Need to use UnlinkObject since Delete would not handle
- * hardlinked objects correctly.
- */
- yaffs_unlink_obj(obj);
- }
+ obj = list_entry(lh, struct yaffs_obj, siblings);
+ if (obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY)
+ yaffs_del_dir_contents(obj);
+ yaffs_trace(YAFFS_TRACE_SCAN,
+ "Deleting lost_found object %d",
+ obj->obj_id);
+ yaffs_unlink_obj(obj);
}
-
}
static void yaffs_empty_l_n_f(struct yaffs_dev *dev)
@@ -4465,13 +4307,11 @@ static void yaffs_empty_l_n_f(struct yaffs_dev *dev)
struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
- const YCHAR * name)
+ const YCHAR *name)
{
int sum;
-
struct list_head *i;
YCHAR buffer[YAFFS_MAX_NAME_LENGTH + 1];
-
struct yaffs_obj *l;
if (!name)
@@ -4481,14 +4321,14 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_find_by_name: null pointer directory"
);
- YBUG();
+ BUG();
return NULL;
}
if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"tragedy: yaffs_find_by_name: non-directory"
);
- YBUG();
+ BUG();
}
sum = yaffs_calc_name_sum(name);
@@ -4497,7 +4337,7 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
l = list_entry(i, struct yaffs_obj, siblings);
if (l->parent != directory)
- YBUG();
+ BUG();
yaffs_check_obj_details_loaded(l);
@@ -4505,8 +4345,7 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
if (l->obj_id == YAFFS_OBJECTID_LOSTNFOUND) {
if (!strcmp(name, YAFFS_LOSTNFOUND_NAME))
return l;
- } else if (l->sum == sum
- || l->hdr_chunk <= 0) {
+ } else if (l->sum == sum || l->hdr_chunk <= 0) {
/* LostnFound chunk called Objxxx
* Do a real check
*/
@@ -4516,7 +4355,6 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
return l;
}
}
-
return NULL;
}
@@ -4527,7 +4365,6 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
struct yaffs_obj *yaffs_get_equivalent_obj(struct yaffs_obj *obj)
{
if (obj && obj->variant_type == YAFFS_OBJECT_TYPE_HARDLINK) {
- /* We want the object id of the equivalent object, not this one */
obj = obj->variant.hardlink_variant.equiv_obj;
yaffs_check_obj_details_loaded(obj);
}
@@ -4547,13 +4384,13 @@ struct yaffs_obj *yaffs_get_equivalent_obj(struct yaffs_obj *obj)
* system to share files.
*
* These automatic unicode are stored slightly differently...
- * - If the name can fit in the ASCII character space then they are saved as
+ * - If the name can fit in the ASCII character space then they are saved as
* ascii names as per above.
* - If the name needs Unicode then the name is saved in Unicode
* starting at oh->name[1].
*/
-static void yaffs_fix_null_name(struct yaffs_obj *obj, YCHAR * name,
+static void yaffs_fix_null_name(struct yaffs_obj *obj, YCHAR *name,
int buffer_size)
{
/* Create an object name if we could not find one. */
@@ -4575,23 +4412,17 @@ static void yaffs_fix_null_name(struct yaffs_obj *obj, YCHAR * name,
}
}
-int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR * name, int buffer_size)
+int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR *name, int buffer_size)
{
memset(name, 0, buffer_size * sizeof(YCHAR));
-
yaffs_check_obj_details_loaded(obj);
-
if (obj->obj_id == YAFFS_OBJECTID_LOSTNFOUND) {
strncpy(name, YAFFS_LOSTNFOUND_NAME, buffer_size - 1);
- }
-#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
- else if (obj->short_name[0]) {
+ } else if (obj->short_name[0]) {
strcpy(name, obj->short_name);
- }
-#endif
- else if (obj->hdr_chunk > 0) {
+ } else if (obj->hdr_chunk > 0) {
int result;
- u8 *buffer = yaffs_get_temp_buffer(obj->my_dev, __LINE__);
+ u8 *buffer = yaffs_get_temp_buffer(obj->my_dev);
struct yaffs_obj_hdr *oh = (struct yaffs_obj_hdr *)buffer;
@@ -4605,7 +4436,7 @@ int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR * name, int buffer_size)
yaffs_load_name_from_oh(obj->my_dev, name, oh->name,
buffer_size);
- yaffs_release_temp_buffer(obj->my_dev, buffer, __LINE__);
+ yaffs_release_temp_buffer(obj->my_dev, buffer);
}
yaffs_fix_null_name(obj, name, buffer_size);
@@ -4678,6 +4509,8 @@ unsigned yaffs_get_obj_type(struct yaffs_obj *obj)
return DT_BLK;
if (S_ISSOCK(obj->yst_mode))
return DT_SOCK;
+ return DT_REG;
+ break;
default:
return DT_REG;
break;
@@ -4697,13 +4530,10 @@ YCHAR *yaffs_get_symlink_alias(struct yaffs_obj *obj)
static int yaffs_check_dev_fns(const struct yaffs_dev *dev)
{
-
/* Common functions, gotta have */
if (!dev->param.erase_fn || !dev->param.initialise_flash_fn)
return 0;
-#ifdef CONFIG_YAFFS_YAFFS2
-
/* Can use the "with tags" style interface for yaffs1 or yaffs2 */
if (dev->param.write_chunk_tags_fn &&
dev->param.read_chunk_tags_fn &&
@@ -4711,7 +4541,6 @@ static int yaffs_check_dev_fns(const struct yaffs_dev *dev)
!dev->param.read_chunk_fn &&
dev->param.bad_block_fn && dev->param.query_block_fn)
return 1;
-#endif
/* Can use the "spare" style interface for yaffs1 */
if (!dev->param.is_yaffs2 &&
@@ -4727,17 +4556,13 @@ static int yaffs_check_dev_fns(const struct yaffs_dev *dev)
static int yaffs_create_initial_dir(struct yaffs_dev *dev)
{
- /* Initialise the unlinked, deleted, root and lost and found directories */
-
+ /* Initialise the unlinked, deleted, root and lost+found directories */
dev->lost_n_found = dev->root_dir = NULL;
dev->unlinked_dir = dev->del_dir = NULL;
-
dev->unlinked_dir =
yaffs_create_fake_dir(dev, YAFFS_OBJECTID_UNLINKED, S_IFDIR);
-
dev->del_dir =
yaffs_create_fake_dir(dev, YAFFS_OBJECTID_DELETED, S_IFDIR);
-
dev->root_dir =
yaffs_create_fake_dir(dev, YAFFS_OBJECTID_ROOT,
YAFFS_ROOT_MODE | S_IFDIR);
@@ -4750,7 +4575,6 @@ static int yaffs_create_initial_dir(struct yaffs_dev *dev)
yaffs_add_obj_to_dir(dev->root_dir, dev->lost_n_found);
return YAFFS_OK;
}
-
return YAFFS_FAIL;
}
@@ -4760,7 +4584,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
unsigned x;
int bits;
- yaffs_trace(YAFFS_TRACE_TRACING, "yaffs: yaffs_guts_initialise()" );
+ yaffs_trace(YAFFS_TRACE_TRACING, "yaffs: yaffs_guts_initialise()");
/* Check stuff that must be set */
@@ -4771,6 +4595,11 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
return YAFFS_FAIL;
}
+ if (dev->is_mounted) {
+ yaffs_trace(YAFFS_TRACE_ALWAYS, "device already mounted");
+ return YAFFS_FAIL;
+ }
+
dev->internal_start_block = dev->param.start_block;
dev->internal_end_block = dev->param.end_block;
dev->block_offset = 0;
@@ -4795,9 +4624,9 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
(dev->param.inband_tags && !dev->param.is_yaffs2) ||
dev->param.chunks_per_block < 2 ||
dev->param.n_reserved_blocks < 2 ||
- dev->internal_start_block <= 0 ||
- dev->internal_end_block <= 0 ||
- dev->internal_end_block <=
+ dev->internal_start_block <= 0 ||
+ dev->internal_end_block <= 0 ||
+ dev->internal_end_block <=
(dev->internal_start_block + dev->param.n_reserved_blocks + 2)
) {
/* otherwise it is too small */
@@ -4831,12 +4660,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
return YAFFS_FAIL;
}
- if (dev->is_mounted) {
- yaffs_trace(YAFFS_TRACE_ALWAYS, "device already mounted");
- return YAFFS_FAIL;
- }
-
- /* Finished with most checks. One or two more checks happen later on too. */
+ /* Finished with most checks. Further checks happen later on too. */
dev->is_mounted = 1;
@@ -4873,7 +4697,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
dev->tnode_width = bits;
} else {
dev->tnode_width = 16;
- }
+ }
dev->tnode_mask = (1 << dev->tnode_width) - 1;
@@ -4904,7 +4728,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
return YAFFS_FAIL;
}
- /* OK, we've finished verifying the device, lets continue with initialisation */
+ /* Finished verifying the device, continue with initialisation */
/* More device initialisation */
dev->all_gcs = 0;
@@ -4924,7 +4748,8 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
dev->n_erase_failures = 0;
dev->n_erased_blocks = 0;
dev->gc_disable = 0;
- dev->has_pending_prioritised_gc = 1; /* Assume the worst for now, will get fixed on first GC */
+ dev->has_pending_prioritised_gc = 1;
+ /* Assume the worst for now, will get fixed on first GC */
INIT_LIST_HEAD(&dev->dirty_dirs);
dev->oldest_dirty_seq = 0;
dev->oldest_dirty_block = 0;
@@ -4986,18 +4811,24 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
if (!init_failed && !yaffs_create_initial_dir(dev))
init_failed = 1;
+ if(!init_failed && dev->param.is_yaffs2 &&
+ !dev->param.disable_summary &&
+ !yaffs_summary_init(dev))
+ init_failed = 1;
+
if (!init_failed) {
/* Now scan the flash. */
if (dev->param.is_yaffs2) {
if (yaffs2_checkpt_restore(dev)) {
yaffs_check_obj_details_loaded(dev->root_dir);
- yaffs_trace(YAFFS_TRACE_CHECKPOINT | YAFFS_TRACE_MOUNT,
+ yaffs_trace(YAFFS_TRACE_CHECKPOINT |
+ YAFFS_TRACE_MOUNT,
"yaffs: restored from checkpoint"
);
} else {
- /* Clean up the mess caused by an aborted checkpoint load
- * and scan backwards.
+ /* Clean up the mess caused by an aborted
+ * checkpoint load then scan backwards.
*/
yaffs_deinit_blocks(dev);
@@ -5025,7 +4856,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
}
} else if (!yaffs1_scan(dev)) {
init_failed = 1;
- }
+ }
yaffs_strip_deleted_objs(dev);
yaffs_fix_hanging_objs(dev);
@@ -5047,7 +4878,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
dev->n_page_writes = 0;
dev->n_erasures = 0;
dev->n_gc_copies = 0;
- dev->n_retired_writes = 0;
+ dev->n_retried_writes = 0;
dev->n_retired_blocks = 0;
@@ -5061,7 +4892,6 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
yaffs_trace(YAFFS_TRACE_TRACING,
"yaffs: yaffs_guts_initialise() done.");
return YAFFS_OK;
-
}
void yaffs_deinitialise(struct yaffs_dev *dev)
@@ -5071,11 +4901,12 @@ void yaffs_deinitialise(struct yaffs_dev *dev)
yaffs_deinit_blocks(dev);
yaffs_deinit_tnodes_and_objs(dev);
+ yaffs_summary_deinit(dev);
+
if (dev->param.n_caches > 0 && dev->cache) {
for (i = 0; i < dev->param.n_caches; i++) {
- if (dev->cache[i].data)
- kfree(dev->cache[i].data);
+ kfree(dev->cache[i].data);
dev->cache[i].data = NULL;
}
@@ -5099,7 +4930,6 @@ int yaffs_count_free_chunks(struct yaffs_dev *dev)
{
int n_free = 0;
int b;
-
struct yaffs_block_info *blk;
blk = dev->block_info;
@@ -5118,14 +4948,12 @@ int yaffs_count_free_chunks(struct yaffs_dev *dev)
}
blk++;
}
-
return n_free;
}
int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
{
/* This is what we report to the outside world */
-
int n_free;
int n_dirty_caches;
int blocks_for_checkpt;
@@ -5134,7 +4962,7 @@ int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
n_free = dev->n_free_chunks;
n_free += dev->n_deleted_files;
- /* Now count the number of dirty chunks in the cache and subtract those */
+ /* Now count and subtract the number of dirty chunks in the cache. */
for (n_dirty_caches = 0, i = 0; i < dev->param.n_caches; i++) {
if (dev->cache[i].dirty)
@@ -5146,7 +4974,7 @@ int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
n_free -=
((dev->param.n_reserved_blocks + 1) * dev->param.chunks_per_block);
- /* Now we figure out how much to reserve for the checkpoint and report that... */
+ /* Now figure checkpoint space and report that... */
blocks_for_checkpt = yaffs_calc_checkpt_blocks_required(dev);
n_free -= (blocks_for_checkpt * dev->param.chunks_per_block);
@@ -5155,5 +4983,4 @@ int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
n_free = 0;
return n_free;
-
}
diff --git a/yaffs_guts.h b/yaffs_guts.h
index 307eba2..490122a 100644
--- a/yaffs_guts.h
+++ b/yaffs_guts.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -23,33 +23,33 @@
/* Give us a Y=0x59,
* Give us an A=0x41,
- * Give us an FF=0xFF
+ * Give us an FF=0xff
* Give us an S=0x53
* And what have we got...
*/
-#define YAFFS_MAGIC 0x5941FF53
+#define YAFFS_MAGIC 0x5941ff53
-#define YAFFS_NTNODES_LEVEL0 16
+#define YAFFS_NTNODES_LEVEL0 16
#define YAFFS_TNODES_LEVEL0_BITS 4
#define YAFFS_TNODES_LEVEL0_MASK 0xf
-#define YAFFS_NTNODES_INTERNAL (YAFFS_NTNODES_LEVEL0 / 2)
-#define YAFFS_TNODES_INTERNAL_BITS (YAFFS_TNODES_LEVEL0_BITS - 1)
+#define YAFFS_NTNODES_INTERNAL (YAFFS_NTNODES_LEVEL0 / 2)
+#define YAFFS_TNODES_INTERNAL_BITS (YAFFS_TNODES_LEVEL0_BITS - 1)
#define YAFFS_TNODES_INTERNAL_MASK 0x7
#define YAFFS_TNODES_MAX_LEVEL 6
-#ifndef CONFIG_YAFFS_NO_YAFFS1
+
+/* Constants for YAFFS1 mode */
#define YAFFS_BYTES_PER_SPARE 16
#define YAFFS_BYTES_PER_CHUNK 512
#define YAFFS_CHUNK_SIZE_SHIFT 9
#define YAFFS_CHUNKS_PER_BLOCK 32
-#define YAFFS_BYTES_PER_BLOCK (YAFFS_CHUNKS_PER_BLOCK*YAFFS_BYTES_PER_CHUNK)
-#endif
+#define YAFFS_BYTES_PER_BLOCK (YAFFS_CHUNKS_PER_BLOCK*YAFFS_BYTES_PER_CHUNK)
-#define YAFFS_MIN_YAFFS2_CHUNK_SIZE 1024
+#define YAFFS_MIN_YAFFS2_CHUNK_SIZE 1024
#define YAFFS_MIN_YAFFS2_SPARE_SIZE 32
-#define YAFFS_MAX_CHUNK_ID 0x000FFFFF
+#define YAFFS_MAX_CHUNK_ID 0x000fffff
#define YAFFS_ALLOCATION_NOBJECTS 100
#define YAFFS_ALLOCATION_NTNODES 100
@@ -58,9 +58,9 @@
#define YAFFS_NOBJECT_BUCKETS 256
#define YAFFS_OBJECT_SPACE 0x40000
-#define YAFFS_MAX_OBJECT_ID (YAFFS_OBJECT_SPACE -1)
+#define YAFFS_MAX_OBJECT_ID (YAFFS_OBJECT_SPACE - 1)
-#define YAFFS_CHECKPOINT_VERSION 4
+#define YAFFS_CHECKPOINT_VERSION 4
#ifdef CONFIG_YAFFS_UNICODE
#define YAFFS_MAX_NAME_LENGTH 127
@@ -78,10 +78,12 @@
#define YAFFS_OBJECTID_UNLINKED 3
#define YAFFS_OBJECTID_DELETED 4
+/* Fake object Id for summary data */
+#define YAFFS_OBJECTID_SUMMARY 0x10
+
/* Pseudo object ids for checkpointing */
-#define YAFFS_OBJECTID_SB_HEADER 0x10
#define YAFFS_OBJECTID_CHECKPOINT_DATA 0x20
-#define YAFFS_SEQUENCE_CHECKPOINT_DATA 0x21
+#define YAFFS_SEQUENCE_CHECKPOINT_DATA 0x21
#define YAFFS_MAX_SHORT_OP_CACHES 20
@@ -97,14 +99,14 @@
* The range is limited slightly to help distinguish bad numbers from good.
* This also allows us to perhaps in the future use special numbers for
* special purposes.
- * EFFFFF00 allows the allocation of 8 blocks per second (~1Mbytes) for 15 years,
+ * EFFFFF00 allows the allocation of 8 blocks/second (~1Mbytes) for 15 years,
* and is a larger number than the lifetime of a 2GB device.
*/
#define YAFFS_LOWEST_SEQUENCE_NUMBER 0x00001000
-#define YAFFS_HIGHEST_SEQUENCE_NUMBER 0xEFFFFF00
+#define YAFFS_HIGHEST_SEQUENCE_NUMBER 0xefffff00
/* Special sequence number for bad block that failed to be marked bad */
-#define YAFFS_SEQUENCE_BAD_BLOCK 0xFFFF0000
+#define YAFFS_SEQUENCE_BAD_BLOCK 0xffff0000
/* ChunkCache is used for short read/write operations.*/
struct yaffs_cache {
@@ -117,12 +119,11 @@ struct yaffs_cache {
u8 *data;
};
-/* Tags structures in RAM
- * NB This uses bitfield. Bitfields should not straddle a u32 boundary otherwise
- * the structure size will get blown out.
+/* yaffs1 tags structures in RAM
+ * NB This uses bitfield. Bitfields should not straddle a u32 boundary
+ * otherwise the structure size will get blown out.
*/
-#ifndef CONFIG_YAFFS_NO_YAFFS1
struct yaffs_tags {
unsigned chunk_id:20;
unsigned serial_number:2;
@@ -137,7 +138,6 @@ union yaffs_tags_union {
u8 as_bytes[8];
};
-#endif
/* Stuff used for extended tags in YAFFS2 */
@@ -160,11 +160,9 @@ enum yaffs_obj_type {
#define YAFFS_OBJECT_TYPE_MAX YAFFS_OBJECT_TYPE_SPECIAL
struct yaffs_ext_tags {
-
- unsigned validity0;
unsigned chunk_used; /* Status of the chunk: used or unused */
- unsigned obj_id; /* If 0 then this is not part of an object (unused) */
- unsigned chunk_id; /* If 0 then this is a header, else a data chunk */
+ unsigned obj_id; /* If 0 this is not used */
+ unsigned chunk_id; /* If 0 this is a header, else a data chunk */
unsigned n_bytes; /* Only valid for data chunks */
/* The following stuff only has meaning when we read */
@@ -180,7 +178,7 @@ struct yaffs_ext_tags {
/* Extra info if this is an object header (YAFFS2 only) */
- unsigned extra_available; /* There is extra info available if this is not zero */
+ unsigned extra_available; /* Extra info available if not zero */
unsigned extra_parent_id; /* The parent object */
unsigned extra_is_shrink; /* Is it a shrink header? */
unsigned extra_shadows; /* Does this shadow another object? */
@@ -188,10 +186,7 @@ struct yaffs_ext_tags {
enum yaffs_obj_type extra_obj_type; /* What object type? */
unsigned extra_length; /* Length if it is a file */
- unsigned extra_equiv_id; /* Equivalent object Id if it is a hard link */
-
- unsigned validity1;
-
+ unsigned extra_equiv_id; /* Equivalent object for a hard link */
};
/* Spare structure for YAFFS1 */
@@ -225,12 +220,15 @@ enum yaffs_block_state {
YAFFS_BLOCK_STATE_SCANNING,
/* Being scanned */
- YAFFS_BLOCK_STATE_NEEDS_SCANNING,
- /* The block might have something on it (ie it is allocating or full, perhaps empty)
- * but it needs to be scanned to determine its true state.
+ YAFFS_BLOCK_STATE_NEEDS_SCAN,
+ /* The block might have something on it (ie it is allocating or full,
+ * perhaps empty) but it needs to be scanned to determine its true
+ * state.
* This state is only valid during scanning.
- * NB We tolerate empty because the pre-scanner might be incapable of deciding
- * However, if this state is returned on a YAFFS2 device, then we expect a sequence number
+ * NB We tolerate empty because the pre-scanner might be incapable of
+ * deciding
+ * However, if this state is returned on a YAFFS2 device,
+ * then we expect a sequence number
*/
YAFFS_BLOCK_STATE_EMPTY,
@@ -241,7 +239,8 @@ enum yaffs_block_state {
* At least one page holds valid data.
* This is the one currently being used for page
* allocation. Should never be more than one of these.
- * If a block is only partially allocated at mount it is treated as full.
+ * If a block is only partially allocated at mount it is treated as
+ * full.
*/
YAFFS_BLOCK_STATE_FULL,
@@ -271,18 +270,20 @@ struct yaffs_block_info {
int soft_del_pages:10; /* number of soft deleted pages */
int pages_in_use:10; /* number of pages in use */
- unsigned block_state:4; /* One of the above block states. NB use unsigned because enum is sometimes an int */
- u32 needs_retiring:1; /* Data has failed on this block, need to get valid data off */
- /* and retire the block. */
- u32 skip_erased_check:1; /* If this is set we can skip the erased check on this block */
- u32 gc_prioritise:1; /* An ECC check or blank check has failed on this block.
- It should be prioritised for GC */
- u32 chunk_error_strikes:3; /* How many times we've had ecc etc failures on this block and tried to reuse it */
-
-#ifdef CONFIG_YAFFS_YAFFS2
- u32 has_shrink_hdr:1; /* This block has at least one shrink object header */
+ unsigned block_state:4; /* One of the above block states. */
+ /* NB use unsigned because enum is sometimes
+ * an int */
+ u32 needs_retiring:1; /* Data has failed on this block, */
+ /*need to get valid data off and retire*/
+ u32 skip_erased_check:1;/* Skip the erased check on this block */
+ u32 gc_prioritise:1; /* An ECC check or blank check has failed.
+ Block should be prioritised for GC */
+ u32 chunk_error_strikes:3; /* How many times we've had ecc etc
+ failures on this block and tried to reuse it */
+ u32 has_summary:1; /* The block has a summary */
+
+ u32 has_shrink_hdr:1; /* This block has at least one shrink header */
u32 seq_number; /* block sequence number for yaffs2 */
-#endif
};
@@ -297,7 +298,7 @@ struct yaffs_obj_hdr {
u16 sum_no_longer_used; /* checksum of name. No longer used */
YCHAR name[YAFFS_MAX_NAME_LENGTH + 1];
- /* The following apply to directories, files, symlinks - not hard links */
+ /* The following apply to all object types except for hard links */
u32 yst_mode; /* protection */
u32 yst_uid;
@@ -315,7 +316,7 @@ struct yaffs_obj_hdr {
/* Alias is for symlinks only. */
YCHAR alias[YAFFS_MAX_ALIAS_LENGTH + 1];
- u32 yst_rdev; /* device stuff for block and char devices (major/min) */
+ u32 yst_rdev; /* stuff for block and char devices (major/min) */
u32 win_ctime[2];
u32 win_atime[2];
@@ -325,9 +326,10 @@ struct yaffs_obj_hdr {
u32 inband_is_shrink;
u32 reserved[2];
- int shadows_obj; /* This object header shadows the specified object if > 0 */
+ int shadows_obj; /* This object header shadows the
+ specified object if > 0 */
- /* is_shrink applies to object headers written when we shrink the file (ie resize) */
+ /* is_shrink applies to object headers written when wemake a hole. */
u32 is_shrink;
};
@@ -378,35 +380,43 @@ union yaffs_obj_var {
struct yaffs_obj {
u8 deleted:1; /* This should only apply to unlinked files. */
u8 soft_del:1; /* it has also been soft deleted */
- u8 unlinked:1; /* An unlinked file. The file should be in the unlinked directory. */
+ u8 unlinked:1; /* An unlinked file.*/
u8 fake:1; /* A fake object has no presence on NAND. */
- u8 rename_allowed:1; /* Some objects are not allowed to be renamed. */
+ u8 rename_allowed:1; /* Some objects cannot be renamed. */
u8 unlink_allowed:1;
u8 dirty:1; /* the object needs to be written to flash */
u8 valid:1; /* When the file system is being loaded up, this
* object might be created before the data
- * is available (ie. file data records appear before the header).
+ * is available
+ * ie. file data chunks encountered before
+ * the header.
*/
- u8 lazy_loaded:1; /* This object has been lazy loaded and is missing some detail */
+ u8 lazy_loaded:1; /* This object has been lazy loaded and
+ * is missing some detail */
- u8 defered_free:1; /* For Linux kernel. Object is removed from NAND, but is
- * still in the inode cache. Free of object is defered.
+ u8 defered_free:1; /* Object is removed from NAND, but is
+ * still in the inode cache.
+ * Free of object is defered.
* until the inode is released.
*/
- u8 being_created:1; /* This object is still being created so skip some checks. */
- u8 is_shadowed:1; /* This object is shadowed on the way to being renamed. */
+ u8 being_created:1; /* This object is still being created
+ * so skip some verification checks. */
+ u8 is_shadowed:1; /* This object is shadowed on the way
+ * to being renamed. */
- u8 xattr_known:1; /* We know if this has object has xattribs or not. */
- u8 has_xattr:1; /* This object has xattribs. Valid if xattr_known. */
+ u8 xattr_known:1; /* We know if this has object has xattribs
+ * or not. */
+ u8 has_xattr:1; /* This object has xattribs.
+ * Only valid if xattr_known. */
- u8 serial; /* serial number of chunk in NAND. Cached here */
+ u8 serial; /* serial number of chunk in NAND.*/
u16 sum; /* sum of the name to speed searching */
struct yaffs_dev *my_dev; /* The device I'm on */
- struct list_head hash_link; /* list of objects in this hash bucket */
+ struct list_head hash_link; /* list of objects in hash bucket */
- struct list_head hard_links; /* all the equivalent hard linked objects */
+ struct list_head hard_links; /* hard linked object chain*/
/* directory structure stuff */
/* also used for linking up the free list */
@@ -416,15 +426,13 @@ struct yaffs_obj {
/* Where's my object header in NAND? */
int hdr_chunk;
- int n_data_chunks; /* Number of data chunks attached to the file. */
+ int n_data_chunks; /* Number of data chunks for this file. */
u32 obj_id; /* the object id value */
u32 yst_mode;
-#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
YCHAR short_name[YAFFS_SHORT_NAME_LENGTH + 1];
-#endif
#ifdef CONFIG_YAFFS_WINCE
u32 win_ctime[2];
@@ -476,13 +484,12 @@ struct yaffs_checkpt_obj {
/*--------------------- Temporary buffers ----------------
*
- * These are chunk-sized working buffers. Each device has a few
+ * These are chunk-sized working buffers. Each device has a few.
*/
struct yaffs_buffer {
u8 *buffer;
- int line; /* track from whence this buffer was allocated */
- int max_line;
+ int in_use;
};
/*----------------- Device ---------------------------------*/
@@ -497,26 +504,29 @@ struct yaffs_param {
*/
int inband_tags; /* Use unband tags */
- u32 total_bytes_per_chunk; /* Should be >= 512, does not need to be a power of 2 */
+ u32 total_bytes_per_chunk; /* Should be >= 512, does not need to
+ be a power of 2 */
int chunks_per_block; /* does not need to be a power of 2 */
int spare_bytes_per_chunk; /* spare area size */
int start_block; /* Start block we're allowed to use */
int end_block; /* End block we're allowed to use */
- int n_reserved_blocks; /* We want this tuneable so that we can reduce */
- /* reserved blocks on NOR and RAM. */
+ int n_reserved_blocks; /* Tuneable so that we can reduce
+ * reserved blocks on NOR and RAM. */
- int n_caches; /* If <= 0, then short op caching is disabled, else
- * the number of short op caches (don't use too many).
- * 10 to 20 is a good bet.
+ int n_caches; /* If <= 0, then short op caching is disabled,
+ * else the number of short op caches.
*/
- int use_nand_ecc; /* Flag to decide whether or not to use NANDECC on data (yaffs1) */
- int no_tags_ecc; /* Flag to decide whether or not to do ECC on packed tags (yaffs2) */
+ int use_nand_ecc; /* Flag to decide whether or not to use
+ * NAND driver ECC on data (yaffs1) */
+ int tags_9bytes; /* Use 9 byte tags */
+ int no_tags_ecc; /* Flag to decide whether or not to do ECC
+ * on packed tags (yaffs2) */
int is_yaffs2; /* Use yaffs2 mode on this device */
int empty_lost_n_found; /* Auto-empty lost+found directory on mount */
- int refresh_period; /* How often we should check to do a block refresh */
+ int refresh_period; /* How often to check for a block refresh */
/* Checkpoint control. Can be set before or after initialisation */
u8 skip_checkpt_rd;
@@ -526,47 +536,48 @@ struct yaffs_param {
/* NAND access functions (Must be set before calling YAFFS) */
- int (*write_chunk_fn) (struct yaffs_dev * dev,
- int nand_chunk, const u8 * data,
- const struct yaffs_spare * spare);
- int (*read_chunk_fn) (struct yaffs_dev * dev,
- int nand_chunk, u8 * data,
- struct yaffs_spare * spare);
- int (*erase_fn) (struct yaffs_dev * dev, int flash_block);
- int (*initialise_flash_fn) (struct yaffs_dev * dev);
- int (*deinitialise_flash_fn) (struct yaffs_dev * dev);
-
-#ifdef CONFIG_YAFFS_YAFFS2
- int (*write_chunk_tags_fn) (struct yaffs_dev * dev,
- int nand_chunk, const u8 * data,
- const struct yaffs_ext_tags * tags);
- int (*read_chunk_tags_fn) (struct yaffs_dev * dev,
- int nand_chunk, u8 * data,
- struct yaffs_ext_tags * tags);
- int (*bad_block_fn) (struct yaffs_dev * dev, int block_no);
- int (*query_block_fn) (struct yaffs_dev * dev, int block_no,
- enum yaffs_block_state * state,
- u32 * seq_number);
-#endif
+ int (*write_chunk_fn) (struct yaffs_dev *dev,
+ int nand_chunk, const u8 *data,
+ const struct yaffs_spare *spare);
+ int (*read_chunk_fn) (struct yaffs_dev *dev,
+ int nand_chunk, u8 *data,
+ struct yaffs_spare *spare);
+ int (*erase_fn) (struct yaffs_dev *dev, int flash_block);
+ int (*initialise_flash_fn) (struct yaffs_dev *dev);
+ int (*deinitialise_flash_fn) (struct yaffs_dev *dev);
+
+ /* yaffs2 mode functions */
+ int (*write_chunk_tags_fn) (struct yaffs_dev *dev,
+ int nand_chunk, const u8 *data,
+ const struct yaffs_ext_tags *tags);
+ int (*read_chunk_tags_fn) (struct yaffs_dev *dev,
+ int nand_chunk, u8 *data,
+ struct yaffs_ext_tags *tags);
+ int (*bad_block_fn) (struct yaffs_dev *dev, int block_no);
+ int (*query_block_fn) (struct yaffs_dev *dev, int block_no,
+ enum yaffs_block_state *state,
+ u32 *seq_number);
/* The remove_obj_fn function must be supplied by OS flavours that
* need it.
* yaffs direct uses it to implement the faster readdir.
* Linux uses it to protect the directory during unlocking.
*/
- void (*remove_obj_fn) (struct yaffs_obj * obj);
+ void (*remove_obj_fn) (struct yaffs_obj *obj);
/* Callback to mark the superblock dirty */
- void (*sb_dirty_fn) (struct yaffs_dev * dev);
+ void (*sb_dirty_fn) (struct yaffs_dev *dev);
/* Callback to control garbage collection. */
- unsigned (*gc_control) (struct yaffs_dev * dev);
+ unsigned (*gc_control) (struct yaffs_dev *dev);
/* Debug control flags. Don't use unless you know what you're doing */
- int use_header_file_size; /* Flag to determine if we should use file sizes from the header */
+ int use_header_file_size; /* Flag to determine if we should use
+ * file sizes from the header */
int disable_lazy_load; /* Disable lazy loading on this device */
int wide_tnodes_disabled; /* Set to disable wide tnodes */
- int disable_soft_del; /* yaffs 1 only: Set to disable the use of softdeletion. */
+ int disable_soft_del; /* yaffs 1 only: Set to disable the use of
+ * softdeletion. */
int defered_dir_update; /* Set to defer directory updates */
@@ -574,6 +585,8 @@ struct yaffs_param {
int auto_unicode;
#endif
int always_check_erased; /* Force chunk erased check always on */
+
+ int disable_summary;
};
struct yaffs_dev {
@@ -602,7 +615,7 @@ struct yaffs_dev {
/* Stuff for figuring out file offset to chunk conversions */
u32 chunk_shift; /* Shift value */
- u32 chunk_div; /* Divisor after shifting: 1 for power-of-2 sizes */
+ u32 chunk_div; /* Divisor after shifting: 1 for 2^n sizes */
u32 chunk_mask; /* Mask to use for power-of-2 case */
int is_mounted;
@@ -616,7 +629,7 @@ struct yaffs_dev {
int chunk_offset;
/* Runtime checkpointing stuff */
- int checkpt_page_seq; /* running sequence number of checkpoint pages */
+ int checkpt_page_seq; /* running sequence number of checkpt pages */
int checkpt_byte_count;
int checkpt_byte_offs;
u8 *checkpt_buffer;
@@ -630,13 +643,14 @@ struct yaffs_dev {
u32 checkpt_sum;
u32 checkpt_xor;
- int checkpoint_blocks_required; /* Number of blocks needed to store current checkpoint set */
+ int checkpoint_blocks_required; /* Number of blocks needed to store
+ * current checkpoint set */
/* Block Info */
struct yaffs_block_info *block_info;
u8 *chunk_bits; /* bitmap of chunks in use */
- unsigned block_info_alt:1; /* was allocated using alternative strategy */
- unsigned chunk_bits_alt:1; /* was allocated using alternative strategy */
+ unsigned block_info_alt:1; /* allocated using alternative alloc */
+ unsigned chunk_bits_alt:1; /* allocated using alternative alloc */
int chunk_bit_stride; /* Number of bytes of chunk_bits per block.
* Must be consistent with chunks_per_block.
*/
@@ -662,7 +676,8 @@ struct yaffs_dev {
u32 *gc_cleanup_list; /* objects to delete at the end of a GC. */
u32 n_clean_ups;
- unsigned has_pending_prioritised_gc; /* We think this device might have pending prioritised gcs */
+ unsigned has_pending_prioritised_gc; /* We think this device might
+ have pending prioritised gcs */
unsigned gc_disable;
unsigned gc_block_finder;
unsigned gc_dirtiest;
@@ -671,16 +686,12 @@ struct yaffs_dev {
unsigned gc_block;
unsigned gc_chunk;
unsigned gc_skip;
+ struct yaffs_summary_tags *gc_sum_tags;
/* Special directories */
struct yaffs_obj *root_dir;
struct yaffs_obj *lost_n_found;
- /* Buffer areas for storing data to recover from write failures TODO
- * u8 buffered_data[YAFFS_CHUNKS_PER_BLOCK][YAFFS_BYTES_PER_CHUNK];
- * struct yaffs_spare buffered_spare[YAFFS_CHUNKS_PER_BLOCK];
- */
-
int buffered_block; /* Which block is buffered here? */
int doing_buffered_block_rewrite;
@@ -688,9 +699,12 @@ struct yaffs_dev {
int cache_last_use;
/* Stuff for background deletion and unlinked files. */
- struct yaffs_obj *unlinked_dir; /* Directory where unlinked and deleted files live. */
- struct yaffs_obj *del_dir; /* Directory where deleted objects are sent to disappear. */
- struct yaffs_obj *unlinked_deletion; /* Current file being background deleted. */
+ struct yaffs_obj *unlinked_dir; /* Directory where unlinked and deleted
+ files live. */
+ struct yaffs_obj *del_dir; /* Directory where deleted objects are
+ sent to disappear. */
+ struct yaffs_obj *unlinked_deletion; /* Current file being
+ background deleted. */
int n_deleted_files; /* Count of files awaiting deletion; */
int n_unlinked_files; /* Count of unlinked files. */
int n_bg_deletions; /* Count of background deletions. */
@@ -703,17 +717,23 @@ struct yaffs_dev {
int unmanaged_buffer_deallocs;
/* yaffs2 runtime stuff */
- unsigned seq_number; /* Sequence number of currently allocating block */
+ unsigned seq_number; /* Sequence number of currently
+ allocating block */
unsigned oldest_dirty_seq;
unsigned oldest_dirty_block;
/* Block refreshing */
- int refresh_skip; /* A skip down counter. Refresh happens when this gets to zero. */
+ int refresh_skip; /* A skip down counter.
+ * Refresh happens when this gets to zero. */
/* Dirty directory handling */
struct list_head dirty_dirs; /* List of dirty directories */
- /* Statistcs */
+ /* Summary */
+ int chunks_per_summary;
+ struct yaffs_summary_tags *sum_tags;
+
+ /* Statistics */
u32 n_page_writes;
u32 n_page_reads;
u32 n_erasures;
@@ -724,7 +744,7 @@ struct yaffs_dev {
u32 oldest_dirty_gc_count;
u32 n_gc_blocks;
u32 bg_gcs;
- u32 n_retired_writes;
+ u32 n_retried_writes;
u32 n_retired_blocks;
u32 n_ecc_fixed;
u32 n_ecc_unfixed;
@@ -734,11 +754,13 @@ struct yaffs_dev {
u32 n_unmarked_deletions;
u32 refresh_count;
u32 cache_hits;
+ u32 tags_used;
+ u32 summary_used;
};
-/* The CheckpointDevice structure holds the device information that changes at runtime and
- * must be preserved over unmount/mount cycles.
+/* The CheckpointDevice structure holds the device information that changes
+ *at runtime and must be preserved over unmount/mount cycles.
*/
struct yaffs_checkpt_dev {
int struct_type;
@@ -752,7 +774,8 @@ struct yaffs_checkpt_dev {
int n_bg_deletions; /* Count of background deletions. */
/* yaffs2 runtime stuff */
- unsigned seq_number; /* Sequence number of currently allocating block */
+ unsigned seq_number; /* Sequence number of currently
+ * allocating block */
};
@@ -806,7 +829,7 @@ int yaffs_wr_file(struct yaffs_obj *obj, const u8 * buffer, loff_t offset,
int yaffs_resize_file(struct yaffs_obj *obj, loff_t new_size);
struct yaffs_obj *yaffs_create_file(struct yaffs_obj *parent,
- const YCHAR * name, u32 mode, u32 uid,
+ const YCHAR *name, u32 mode, u32 uid,
u32 gid);
int yaffs_flush_file(struct yaffs_obj *obj, int update_time, int data_sync);
@@ -818,35 +841,35 @@ int yaffs_checkpoint_save(struct yaffs_dev *dev);
int yaffs_checkpoint_restore(struct yaffs_dev *dev);
/* Directory operations */
-struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR * name,
+struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR *name,
u32 mode, u32 uid, u32 gid);
struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *the_dir,
- const YCHAR * name);
+ const YCHAR *name);
struct yaffs_obj *yaffs_find_by_number(struct yaffs_dev *dev, u32 number);
/* Link operations */
-struct yaffs_obj *yaffs_link_obj(struct yaffs_obj *parent, const YCHAR * name,
+struct yaffs_obj *yaffs_link_obj(struct yaffs_obj *parent, const YCHAR *name,
struct yaffs_obj *equiv_obj);
struct yaffs_obj *yaffs_get_equivalent_obj(struct yaffs_obj *obj);
/* Symlink operations */
struct yaffs_obj *yaffs_create_symlink(struct yaffs_obj *parent,
- const YCHAR * name, u32 mode, u32 uid,
- u32 gid, const YCHAR * alias);
+ const YCHAR *name, u32 mode, u32 uid,
+ u32 gid, const YCHAR *alias);
YCHAR *yaffs_get_symlink_alias(struct yaffs_obj *obj);
/* Special inodes (fifos, sockets and devices) */
struct yaffs_obj *yaffs_create_special(struct yaffs_obj *parent,
- const YCHAR * name, u32 mode, u32 uid,
+ const YCHAR *name, u32 mode, u32 uid,
u32 gid, u32 rdev);
-int yaffs_set_xattrib(struct yaffs_obj *obj, const YCHAR * name,
+int yaffs_set_xattrib(struct yaffs_obj *obj, const YCHAR *name,
const void *value, int size, int flags);
-int yaffs_get_xattrib(struct yaffs_obj *obj, const YCHAR * name, void *value,
+int yaffs_get_xattrib(struct yaffs_obj *obj, const YCHAR *name, void *value,
int size);
int yaffs_list_xattrib(struct yaffs_obj *obj, char *buffer, int size);
-int yaffs_remove_xattrib(struct yaffs_obj *obj, const YCHAR * name);
+int yaffs_remove_xattrib(struct yaffs_obj *obj, const YCHAR *name);
/* Special directories */
struct yaffs_obj *yaffs_root(struct yaffs_dev *dev);
@@ -866,26 +889,26 @@ void yaffs_guts_test(struct yaffs_dev *dev);
/* A few useful functions to be used within the core files*/
void yaffs_chunk_del(struct yaffs_dev *dev, int chunk_id, int mark_flash,
int lyn);
-int yaffs_check_ff(u8 * buffer, int n_bytes);
+int yaffs_check_ff(u8 *buffer, int n_bytes);
void yaffs_handle_chunk_error(struct yaffs_dev *dev,
struct yaffs_block_info *bi);
-u8 *yaffs_get_temp_buffer(struct yaffs_dev *dev, int line_no);
-void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no);
+u8 *yaffs_get_temp_buffer(struct yaffs_dev *dev);
+void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 *buffer);
struct yaffs_obj *yaffs_find_or_create_by_number(struct yaffs_dev *dev,
int number,
enum yaffs_obj_type type);
int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
int nand_chunk, int in_scan);
-void yaffs_set_obj_name(struct yaffs_obj *obj, const YCHAR * name);
+void yaffs_set_obj_name(struct yaffs_obj *obj, const YCHAR *name);
void yaffs_set_obj_name_from_oh(struct yaffs_obj *obj,
const struct yaffs_obj_hdr *oh);
void yaffs_add_obj_to_dir(struct yaffs_obj *directory, struct yaffs_obj *obj);
-YCHAR *yaffs_clone_str(const YCHAR * str);
-void yaffs_link_fixup(struct yaffs_dev *dev, struct yaffs_obj *hard_list);
+YCHAR *yaffs_clone_str(const YCHAR *str);
+void yaffs_link_fixup(struct yaffs_dev *dev, struct list_head *hard_list);
void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no);
-int yaffs_update_oh(struct yaffs_obj *in, const YCHAR * name,
+int yaffs_update_oh(struct yaffs_obj *in, const YCHAR *name,
int force, int is_shrink, int shadows,
struct yaffs_xattr_mod *xop);
void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
@@ -897,7 +920,7 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
u32 chunk_id,
struct yaffs_tnode *passed_tn);
-int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
+int yaffs_do_file_wr(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
int n_bytes, int write_trhrough);
void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size);
void yaffs_skip_rest_of_block(struct yaffs_dev *dev);
diff --git a/yaffs_linux.h b/yaffs_linux.h
index 3b508cb..8c522c8 100644
--- a/yaffs_linux.h
+++ b/yaffs_linux.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -25,11 +25,11 @@ struct yaffs_linux_context {
struct task_struct *bg_thread; /* Background thread for this device */
int bg_running;
struct mutex gross_lock; /* Gross locking mutex*/
- u8 *spare_buffer; /* For mtdif2 use. Don't know the size of the buffer
+ u8 *spare_buffer; /* For mtdif2 use. Don't know the buffer size
* at compile time so we have to allocate it.
*/
struct list_head search_contexts;
- void (*put_super_fn) (struct super_block * sb);
+ void (*put_super_fn) (struct super_block *sb);
struct task_struct *readdir_process;
unsigned mount_id;
diff --git a/yaffs_mtdif.c b/yaffs_mtdif.c
index 7cf53b3..edc1525 100644
--- a/yaffs_mtdif.c
+++ b/yaffs_mtdif.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -26,10 +26,9 @@ int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
u32 addr =
- ((loff_t) block_no) * dev->param.total_bytes_per_chunk
- * dev->param.chunks_per_block;
+ ((loff_t) block_no) * dev->param.total_bytes_per_chunk *
+ dev->param.chunks_per_block;
struct erase_info ei;
-
int retval = 0;
ei.mtd = mtd;
@@ -44,8 +43,8 @@ int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
if (retval == 0)
return YAFFS_OK;
- else
- return YAFFS_FAIL;
+
+ return YAFFS_FAIL;
}
int nandmtd_initialise(struct yaffs_dev *dev)
diff --git a/yaffs_mtdif.h b/yaffs_mtdif.h
index 6665074..3ef5581 100644
--- a/yaffs_mtdif.h
+++ b/yaffs_mtdif.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_mtdif1.h b/yaffs_mtdif1.h
index 07ce452..6a5df50 100644
--- a/yaffs_mtdif1.h
+++ b/yaffs_mtdif1.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System. 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
*
* This program is free software; you can redistribute it and/or modify
@@ -15,15 +15,15 @@
#define __YAFFS_MTDIF1_H__
int nandmtd1_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- const u8 * data,
+ const u8 *data,
const struct yaffs_ext_tags *tags);
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- u8 * data, struct yaffs_ext_tags *tags);
+ u8 *data, struct yaffs_ext_tags *tags);
int nandmtd1_mark_block_bad(struct yaffs_dev *dev, int block_no);
int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
- enum yaffs_block_state *state, u32 * seq_number);
+ enum yaffs_block_state *state, u32 *seq_number);
#endif
diff --git a/yaffs_mtdif1_multi.c b/yaffs_mtdif1_multi.c
index cf9c54c..3673891 100644
--- a/yaffs_mtdif1_multi.c
+++ b/yaffs_mtdif1_multi.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 Charles Manning <charles@aleph1.co.uk>
@@ -39,15 +39,10 @@
/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
#if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17))
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
-# define YTAG1_SIZE 8
-#else
-# define YTAG1_SIZE 9
-#endif
#if 0
/* Use the following nand_ecclayout with MTD when using
- * CONFIG_YAFFS_9BYTE_TAGS and the older on-NAND tags layout.
+ * 9 byte tags and the older on-NAND tags layout.
* If you have existing Yaffs images and the byte order differs from this,
* adjust 'oobfree' to match your existing Yaffs data.
*
@@ -64,7 +59,7 @@ static struct nand_ecclayout nand_oob_16 = {
.eccbytes = 6,
.eccpos = {8, 9, 10, 13, 14, 15},
.oobavail = 9,
- .oobfree = {{0, 4}, {6, 2}, {11, 2}, {4, 1}}
+ .oobfree = {{0, 4}, {6, 2}, {11, 2}, {4, 1} }
};
#endif
@@ -90,7 +85,7 @@ static struct nand_ecclayout nand_oob_16 = {
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
- int nand_chunk, const u8 * data,
+ int nand_chunk, const u8 *data,
const struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -113,27 +108,27 @@ int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
* that only zeroed-bits stick and set tag bytes to all-ones and
* zero just the (not) deleted bit.
*/
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
- if (etags->is_deleted) {
- memset(&pt1, 0xff, 8);
- /* clear delete status bit to indicate deleted */
- pt1.deleted = 0;
- }
-#else
- ((u8 *) & pt1)[8] = 0xff;
- if (etags->is_deleted) {
- memset(&pt1, 0xff, 8);
- /* zero page_status byte to indicate deleted */
- ((u8 *) & pt1)[8] = 0;
+ if(dev->param.tags_9bytes) {
+ ((u8 *) &pt1)[8] = 0xff;
+ if (etags->is_deleted) {
+ memset(&pt1, 0xff, 8);
+ /* zero page_status byte to indicate deleted */
+ ((u8 *) &pt1)[8] = 0;
+ }
+ } else {
+ if (etags->is_deleted) {
+ memset(&pt1, 0xff, 8);
+ /* clear delete status bit to indicate deleted */
+ pt1.deleted = 0;
+ }
}
-#endif
memset(&ops, 0, sizeof(ops));
ops.mode = MTD_OOB_AUTO;
ops.len = (data) ? chunk_bytes : 0;
- ops.ooblen = YTAG1_SIZE;
+ ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
ops.datbuf = (u8 *) data;
- ops.oobbuf = (u8 *) & pt1;
+ ops.oobbuf = (u8 *) &pt1;
retval = mtd->write_oob(mtd, addr, &ops);
if (retval) {
@@ -169,7 +164,7 @@ static int rettags(struct yaffs_ext_tags *etags, int ecc_result, int retval)
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
- int nand_chunk, u8 * data,
+ int nand_chunk, u8 *data,
struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -184,9 +179,9 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
memset(&ops, 0, sizeof(ops));
ops.mode = MTD_OOB_AUTO;
ops.len = (data) ? chunk_bytes : 0;
- ops.ooblen = YTAG1_SIZE;
+ ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
ops.datbuf = data;
- ops.oobbuf = (u8 *) & pt1;
+ ops.oobbuf = (u8 *) &pt1;
#if (MTD_VERSION_CODE < MTD_VERSION(2, 6, 20))
/* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug;
@@ -226,20 +221,21 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
/* Check for a blank/erased chunk.
*/
- if (yaffs_check_ff((u8 *) & pt1, 8)) {
+ if (yaffs_check_ff((u8 *) &pt1, 8)) {
/* when blank, upper layers want ecc_result to be <= NO_ERROR */
return rettags(etags, YAFFS_ECC_RESULT_NO_ERROR, YAFFS_OK);
}
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
- /* Read deleted status (bit) then return it to it's non-deleted
- * state before performing tags mini-ECC check. pt1.deleted is
- * inverted.
- */
- deleted = !pt1.deleted;
- pt1.deleted = 1;
-#else
- deleted = (hweight8(((u8 *) & pt1)[8]) < 7);
-#endif
+
+ if(dev->param.tags_9bytes) {
+ deleted = (hweight8(((u8 *) &pt1)[8]) < 7);
+ } else {
+ /* Read deleted status (bit) then return it to it's non-deleted
+ * state before performing tags mini-ECC check. pt1.deleted is
+ * inverted.
+ */
+ deleted = !pt1.deleted;
+ pt1.deleted = 1;
+ }
/* Check the packed tags mini-ECC and correct if necessary/possible.
*/
@@ -263,7 +259,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
/* Unpack the tags to extended form and set ECC result.
* [set should_be_ff just to keep yaffs_unpack_tags1 happy]
*/
- pt1.should_be_ff = 0xFFFFFFFF;
+ pt1.should_be_ff = 0xffffffff;
yaffs_unpack_tags1(etags, &pt1);
etags->ecc_result = eccres;
@@ -295,16 +291,16 @@ int nandmtd1_mark_block_bad(struct yaffs_dev *dev, int block_no)
*
* Returns YAFFS_OK or YAFFS_FAIL.
*/
-static int nandmtd1_test_prerequists(struct mtd_info *mtd)
+static int nandmtd1_test_prerequists(struct yaffs_dev *dev, struct mtd_info *mtd)
{
/* 2.6.18 has mtd->ecclayout->oobavail */
/* 2.6.21 has mtd->ecclayout->oobavail and mtd->oobavail */
int oobavail = mtd->ecclayout->oobavail;
- if (oobavail < YTAG1_SIZE) {
+ if (oobavail < (dev->param.tags_9bytes ? 9 : 8)) {
yaffs_trace(YAFFS_TRACE_ERROR,
"mtd device has only %d bytes for tags, need %d",
- oobavail, YTAG1_SIZE);
+ oobavail, dev->param.tags_9bytes ? 9 : 8);
return YAFFS_FAIL;
}
return YAFFS_OK;
@@ -314,7 +310,7 @@ static int nandmtd1_test_prerequists(struct mtd_info *mtd)
*
* Examine the tags of the first chunk of the block and return the state:
* - YAFFS_BLOCK_STATE_DEAD, the block is marked bad
- * - YAFFS_BLOCK_STATE_NEEDS_SCANNING, the block is in use
+ * - YAFFS_BLOCK_STATE_NEEDS_SCAN, the block is in use
* - YAFFS_BLOCK_STATE_EMPTY, the block is clean
*
* Always returns YAFFS_OK.
@@ -333,7 +329,7 @@ int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
/* We don't yet have a good place to test for MTD config prerequists.
* Do it here as we are called during the initial scan.
*/
- if (nandmtd1_test_prerequists(mtd) != YAFFS_OK)
+ if (nandmtd1_test_prerequists(dev, mtd) != YAFFS_OK)
return YAFFS_FAIL;
retval = nandmtd1_read_chunk_tags(dev, chunk_num, NULL, &etags);
@@ -345,9 +341,9 @@ int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
state = YAFFS_BLOCK_STATE_DEAD;
} else if (etags.ecc_result != YAFFS_ECC_RESULT_NO_ERROR) {
/* bad tags, need to look more closely */
- state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
} else if (etags.chunk_used) {
- state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
seqnum = etags.seq_number;
} else {
state = YAFFS_BLOCK_STATE_EMPTY;
diff --git a/yaffs_mtdif1_single.c b/yaffs_mtdif1_single.c
index 740f7f6..467a031 100644
--- a/yaffs_mtdif1_single.c
+++ b/yaffs_mtdif1_single.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 Charles Manning <charles@aleph1.co.uk>
@@ -30,18 +30,11 @@
#include "yaffs_packedtags1.h"
#include "yaffs_tagscompat.h" /* for yaffs_calc_tags_ecc */
#include "yaffs_linux.h"
-
#include "linux/kernel.h"
#include "linux/version.h"
#include "linux/types.h"
#include "linux/mtd/mtd.h"
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
-# define YTAG1_SIZE 8
-#else
-# define YTAG1_SIZE 9
-#endif
-
/* Write a chunk (page) of data to NAND.
*
* Caller always provides ExtendedTags data which are converted to a more
@@ -64,7 +57,7 @@
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
- int nand_chunk, const u8 * data,
+ int nand_chunk, const u8 *data,
const struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -87,27 +80,28 @@ int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
* that only zeroed-bits stick and set tag bytes to all-ones and
* zero just the (not) deleted bit.
*/
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
- if (etags->is_deleted) {
- memset(&pt1, 0xff, 8);
- /* clear delete status bit to indicate deleted */
- pt1.deleted = 0;
- }
-#else
- ((u8 *) & pt1)[8] = 0xff;
- if (etags->is_deleted) {
- memset(&pt1, 0xff, 8);
- /* zero page_status byte to indicate deleted */
- ((u8 *) & pt1)[8] = 0;
- }
-#endif
+
+ if(dev->param.tags_9bytes) {
+ ((u8 *) &pt1)[8] = 0xff;
+ if (etags->is_deleted) {
+ memset(&pt1, 0xff, 8);
+ /* zero page_status byte to indicate deleted */
+ ((u8 *) &pt1)[8] = 0;
+ }
+ } else {
+ if (etags->is_deleted) {
+ memset(&pt1, 0xff, 8);
+ /* clear delete status bit to indicate deleted */
+ pt1.deleted = 0;
+ }
+ }
memset(&ops, 0, sizeof(ops));
ops.mode = MTD_OOB_AUTO;
ops.len = (data) ? chunk_bytes : 0;
- ops.ooblen = YTAG1_SIZE;
+ ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
ops.datbuf = (u8 *) data;
- ops.oobbuf = (u8 *) & pt1;
+ ops.oobbuf = (u8 *) &pt1;
retval = mtd->write_oob(mtd, addr, &ops);
if (retval) {
@@ -143,7 +137,7 @@ static int rettags(struct yaffs_ext_tags *etags, int ecc_result, int retval)
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
- int nand_chunk, u8 * data,
+ int nand_chunk, u8 *data,
struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -158,9 +152,9 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
memset(&ops, 0, sizeof(ops));
ops.mode = MTD_OOB_AUTO;
ops.len = (data) ? chunk_bytes : 0;
- ops.ooblen = YTAG1_SIZE;
+ ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
ops.datbuf = data;
- ops.oobbuf = (u8 *) & pt1;
+ ops.oobbuf = (u8 *) &pt1;
/* Read page and oob using MTD.
* Check status and determine ECC result.
@@ -195,7 +189,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
/* Check for a blank/erased chunk.
*/
- if (yaffs_check_ff((u8 *) & pt1, 8)) {
+ if (yaffs_check_ff((u8 *) &pt1, 8)) {
/* when blank, upper layers want ecc_result to be <= NO_ERROR */
return rettags(etags, YAFFS_ECC_RESULT_NO_ERROR, YAFFS_OK);
}
@@ -207,7 +201,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
deleted = !pt1.deleted;
pt1.deleted = 1;
#else
- deleted = (hweight8(((u8 *) & pt1)[8]) < 7);
+ deleted = (hweight8(((u8 *) &pt1)[8]) < 7);
#endif
/* Check the packed tags mini-ECC and correct if necessary/possible.
@@ -232,7 +226,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
/* Unpack the tags to extended form and set ECC result.
* [set should_be_ff just to keep yaffs_unpack_tags1 happy]
*/
- pt1.should_be_ff = 0xFFFFFFFF;
+ pt1.should_be_ff = 0xffffffff;
yaffs_unpack_tags1(etags, &pt1);
etags->ecc_result = eccres;
@@ -271,10 +265,10 @@ static int nandmtd1_test_prerequists(struct mtd_info *mtd)
/* 2.6.21 has mtd->ecclayout->oobavail and mtd->oobavail */
int oobavail = mtd->ecclayout->oobavail;
- if (oobavail < YTAG1_SIZE) {
+ if (oobavail < (dev->param.tags_9bytes ? 9 : 8)) {
yaffs_trace(YAFFS_TRACE_ERROR,
"mtd device has only %d bytes for tags, need %d",
- oobavail, YTAG1_SIZE);
+ oobavail, (dev->param.tags_9bytes ? 9 : 8);
return YAFFS_FAIL;
}
return YAFFS_OK;
@@ -284,7 +278,7 @@ static int nandmtd1_test_prerequists(struct mtd_info *mtd)
*
* Examine the tags of the first chunk of the block and return the state:
* - YAFFS_BLOCK_STATE_DEAD, the block is marked bad
- * - YAFFS_BLOCK_STATE_NEEDS_SCANNING, the block is in use
+ * - YAFFS_BLOCK_STATE_NEEDS_SCAN, the block is in use
* - YAFFS_BLOCK_STATE_EMPTY, the block is clean
*
* Always returns YAFFS_OK.
@@ -314,9 +308,9 @@ int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
state = YAFFS_BLOCK_STATE_DEAD;
} else if (etags.ecc_result != YAFFS_ECC_RESULT_NO_ERROR) {
/* bad tags, need to look more closely */
- state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
} else if (etags.chunk_used) {
- state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
seqnum = etags.seq_number;
} else {
state = YAFFS_BLOCK_STATE_EMPTY;
diff --git a/yaffs_mtdif2.h b/yaffs_mtdif2.h
index d821126..d4d1858 100644
--- a/yaffs_mtdif2.h
+++ b/yaffs_mtdif2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -18,12 +18,12 @@
#include "yaffs_guts.h"
int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- const u8 * data,
+ const u8 *data,
const struct yaffs_ext_tags *tags);
int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- u8 * data, struct yaffs_ext_tags *tags);
+ u8 *data, struct yaffs_ext_tags *tags);
int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no);
int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
- enum yaffs_block_state *state, u32 * seq_number);
+ enum yaffs_block_state *state, u32 *seq_number);
#endif
diff --git a/yaffs_mtdif2_multi.c b/yaffs_mtdif2_multi.c
index 9dcccb8..684ed2a 100644
--- a/yaffs_mtdif2_multi.c
+++ b/yaffs_mtdif2_multi.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -27,11 +27,11 @@
#include "yaffs_linux.h"
/* NB For use with inband tags....
- * We assume that the data buffer is of size total_bytes_per_chunk so that we can also
- * use it to load the tags.
+ * We assume that the data buffer is of size total_bytes_per_chunk so
+ * that we can also use it to load the tags.
*/
int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- const u8 * data,
+ const u8 *data,
const struct yaffs_ext_tags *tags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -67,12 +67,12 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
struct yaffs_packed_tags2_tags_only *pt2tp;
pt2tp =
(struct yaffs_packed_tags2_tags_only *)(data +
- dev->
- data_bytes_per_chunk);
+ dev->
+ data_bytes_per_chunk);
yaffs_pack_tags2_tags_only(pt2tp, tags);
} else {
yaffs_pack_tags2(&pt, tags, !dev->param.no_tags_ecc);
- }
+ }
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
ops.mode = MTD_OOB_AUTO;
@@ -102,7 +102,7 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
}
int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- u8 * data, struct yaffs_ext_tags *tags)
+ u8 *data, struct yaffs_ext_tags *tags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
#if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17))
@@ -129,7 +129,7 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
if (!data) {
local_data = 1;
- data = yaffs_get_temp_buffer(dev, __LINE__);
+ data = yaffs_get_temp_buffer(dev);
}
}
@@ -182,7 +182,7 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
}
if (local_data)
- yaffs_release_temp_buffer(dev, data, __LINE__);
+ yaffs_release_temp_buffer(dev, data);
if (tags && retval == -EBADMSG
&& tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
@@ -221,7 +221,7 @@ int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no)
}
int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
- enum yaffs_block_state *state, u32 * seq_number)
+ enum yaffs_block_state *state, u32 *seq_number)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
int retval;
@@ -244,7 +244,7 @@ int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
if (t.chunk_used) {
*seq_number = t.seq_number;
- *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
} else {
*seq_number = 0;
*state = YAFFS_BLOCK_STATE_EMPTY;
diff --git a/yaffs_mtdif2_single.c b/yaffs_mtdif2_single.c
index d1643df..c013232 100644
--- a/yaffs_mtdif2_single.c
+++ b/yaffs_mtdif2_single.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -15,33 +15,27 @@
#include "yportenv.h"
#include "yaffs_trace.h"
-
#include "yaffs_mtdif2.h"
-
+#include "yaffs_packedtags2.h"
+#include "yaffs_linux.h"
#include "linux/mtd/mtd.h"
#include "linux/types.h"
#include "linux/time.h"
-#include "yaffs_packedtags2.h"
-
-#include "yaffs_linux.h"
/* NB For use with inband tags....
- * We assume that the data buffer is of size total_bytes_per_chunk so that we can also
- * use it to load the tags.
+ * We assume that the data buffer is of size total_bytes_per_chunk so that
+ * we can also use it to load the tags.
*/
int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- const u8 * data,
+ const u8 *data,
const struct yaffs_ext_tags *tags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
struct mtd_oob_ops ops;
int retval = 0;
-
loff_t addr;
-
struct yaffs_packed_tags2 pt;
-
int packed_tags_size =
dev->param.no_tags_ecc ? sizeof(pt.t) : sizeof(pt);
void *packed_tags_ptr =
@@ -61,14 +55,14 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
BUG();
else if (dev->param.inband_tags) {
struct yaffs_packed_tags2_tags_only *pt2tp;
+
pt2tp =
- (struct yaffs_packed_tags2_tags_only *)(data +
- dev->
- data_bytes_per_chunk);
+ (struct yaffs_packed_tags2_tags_only *)
+ (data + dev->data_bytes_per_chunk);
yaffs_pack_tags2_tags_only(pt2tp, tags);
} else {
yaffs_pack_tags2(&pt, tags, !dev->param.no_tags_ecc);
- }
+ }
ops.mode = MTD_OOB_AUTO;
ops.ooblen = (dev->param.inband_tags) ? 0 : packed_tags_size;
@@ -80,24 +74,20 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
if (retval == 0)
return YAFFS_OK;
- else
- return YAFFS_FAIL;
+
+ return YAFFS_FAIL;
}
int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
- u8 * data, struct yaffs_ext_tags *tags)
+ u8 *data, struct yaffs_ext_tags *tags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
struct mtd_oob_ops ops;
-
size_t dummy;
int retval = 0;
int local_data = 0;
-
loff_t addr = ((loff_t) nand_chunk) * dev->param.total_bytes_per_chunk;
-
struct yaffs_packed_tags2 pt;
-
int packed_tags_size =
dev->param.no_tags_ecc ? sizeof(pt.t) : sizeof(pt);
void *packed_tags_ptr =
@@ -107,19 +97,15 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
"nandmtd2_read_chunk_tags chunk %d data %p tags %p",
nand_chunk, data, tags);
- if (dev->param.inband_tags) {
-
- if (!data) {
- local_data = 1;
- data = yaffs_get_temp_buffer(dev, __LINE__);
- }
-
+ if (dev->param.inband_tags && !data) {
+ local_data = 1;
+ data = yaffs_get_temp_buffer(dev);
}
- if (dev->param.inband_tags || (data && !tags))
+ if (dev->param.inband_tags || (data && !tags)) {
retval = mtd->read(mtd, addr, dev->param.total_bytes_per_chunk,
&dummy, data);
- else if (tags) {
+ } else if (tags) {
ops.mode = MTD_OOB_AUTO;
ops.ooblen = packed_tags_size;
ops.len = data ? dev->data_bytes_per_chunk : packed_tags_size;
@@ -129,46 +115,45 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
retval = mtd->read_oob(mtd, addr, &ops);
}
- if (dev->param.inband_tags) {
- if (tags) {
- struct yaffs_packed_tags2_tags_only *pt2tp;
- pt2tp =
- (struct yaffs_packed_tags2_tags_only *)&data[dev->
- data_bytes_per_chunk];
- yaffs_unpack_tags2_tags_only(tags, pt2tp);
- }
- } else {
- if (tags) {
- memcpy(packed_tags_ptr,
- yaffs_dev_to_lc(dev)->spare_buffer,
- packed_tags_size);
- yaffs_unpack_tags2(tags, &pt, !dev->param.no_tags_ecc);
- }
+ if (dev->param.inband_tags && tags) {
+ struct yaffs_packed_tags2_tags_only *pt2tp;
+
+ pt2tp =
+ (struct yaffs_packed_tags2_tags_only *)
+ &data[dev->data_bytes_per_chunk];
+ yaffs_unpack_tags2_tags_only(tags, pt2tp);
+ } else if (tags) {
+ memcpy(packed_tags_ptr,
+ yaffs_dev_to_lc(dev)->spare_buffer,
+ packed_tags_size);
+ yaffs_unpack_tags2(tags, &pt, !dev->param.no_tags_ecc);
}
if (local_data)
- yaffs_release_temp_buffer(dev, data, __LINE__);
+ yaffs_release_temp_buffer(dev, data);
- if (tags && retval == -EBADMSG
- && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
+ if (tags && retval == -EBADMSG &&
+ tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
tags->ecc_result = YAFFS_ECC_RESULT_UNFIXED;
dev->n_ecc_unfixed++;
}
- if (tags && retval == -EUCLEAN
- && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
+ if (tags && retval == -EUCLEAN &&
+ tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
tags->ecc_result = YAFFS_ECC_RESULT_FIXED;
dev->n_ecc_fixed++;
}
+
if (retval == 0)
return YAFFS_OK;
- else
- return YAFFS_FAIL;
+
+ return YAFFS_FAIL;
}
int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
int retval;
+
yaffs_trace(YAFFS_TRACE_MTD,
"nandmtd2_mark_block_bad %d", block_no);
@@ -179,9 +164,8 @@ int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no)
if (retval == 0)
return YAFFS_OK;
- else
- return YAFFS_FAIL;
+ return YAFFS_FAIL;
}
int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
@@ -203,12 +187,13 @@ int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
*seq_number = 0;
} else {
struct yaffs_ext_tags t;
+
nandmtd2_read_chunk_tags(dev, block_no *
dev->param.chunks_per_block, NULL, &t);
if (t.chunk_used) {
*seq_number = t.seq_number;
- *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
} else {
*seq_number = 0;
*state = YAFFS_BLOCK_STATE_EMPTY;
@@ -219,7 +204,6 @@ int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
if (retval == 0)
return YAFFS_OK;
- else
- return YAFFS_FAIL;
-}
+ return YAFFS_FAIL;
+}
diff --git a/yaffs_nameval.c b/yaffs_nameval.c
index daa36f9..487b03e 100644
--- a/yaffs_nameval.c
+++ b/yaffs_nameval.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -12,15 +12,15 @@
*/
/*
- * This simple implementation of a name-value store assumes a small number of values and fits
- * into a small finite buffer.
+ * This simple implementation of a name-value store assumes a small number of
+* values and fits into a small finite buffer.
*
* Each attribute is stored as a record:
* sizeof(int) bytes record size.
* strnlen+1 bytes name null terminated.
* nbytes value.
* ----------
- * total size stored in record size
+ * total size stored in record size
*
* This code has not been tested with unicode yet.
*/
@@ -29,7 +29,7 @@
#include "yportenv.h"
-static int nval_find(const char *xb, int xb_size, const YCHAR * name,
+static int nval_find(const char *xb, int xb_size, const YCHAR *name,
int *exist_size)
{
int pos = 0;
@@ -37,8 +37,7 @@ static int nval_find(const char *xb, int xb_size, const YCHAR * name,
memcpy(&size, xb, sizeof(int));
while (size > 0 && (size < xb_size) && (pos + size < xb_size)) {
- if (strncmp
- ((YCHAR *) (xb + pos + sizeof(int)), name, size) == 0) {
+ if (!strncmp((YCHAR *) (xb + pos + sizeof(int)), name, size)) {
if (exist_size)
*exist_size = size;
return pos;
@@ -51,7 +50,7 @@ static int nval_find(const char *xb, int xb_size, const YCHAR * name,
}
if (exist_size)
*exist_size = 0;
- return -1;
+ return -ENODATA;
}
static int nval_used(const char *xb, int xb_size)
@@ -70,24 +69,24 @@ static int nval_used(const char *xb, int xb_size)
return pos;
}
-int nval_del(char *xb, int xb_size, const YCHAR * name)
+int nval_del(char *xb, int xb_size, const YCHAR *name)
{
int pos = nval_find(xb, xb_size, name, NULL);
int size;
- if (pos >= 0 && pos < xb_size) {
- /* Find size, shift rest over this record, then zero out the rest of buffer */
- memcpy(&size, xb + pos, sizeof(int));
- memcpy(xb + pos, xb + pos + size, xb_size - (pos + size));
- memset(xb + (xb_size - size), 0, size);
- return 0;
- } else {
+ if (pos < 0 || pos >= xb_size)
return -ENODATA;
- }
+
+ /* Find size, shift rest over this record,
+ * then zero out the rest of buffer */
+ memcpy(&size, xb + pos, sizeof(int));
+ memcpy(xb + pos, xb + pos + size, xb_size - (pos + size));
+ memset(xb + (xb_size - size), 0, size);
+ return 0;
}
-int nval_set(char *xb, int xb_size, const YCHAR * name, const char *buf,
- int bsize, int flags)
+int nval_set(char *xb, int xb_size, const YCHAR *name, const char *buf,
+ int bsize, int flags)
{
int pos;
int namelen = strnlen(name, xb_size);
@@ -147,16 +146,21 @@ int nval_get(const char *xb, int xb_size, const YCHAR * name, char *buf,
pos++;
size--;
+ /* If bsize is zero then this is a size query.
+ * Return the size, but don't copy.
+ */
+ if (!bsize)
+ return size;
+
if (size <= bsize) {
memcpy(buf, xb + pos, size);
return size;
}
-
}
if (pos >= 0)
return -ERANGE;
- else
- return -ENODATA;
+
+ return -ENODATA;
}
int nval_list(const char *xb, int xb_size, char *buf, int bsize)
@@ -168,8 +172,10 @@ int nval_list(const char *xb, int xb_size, char *buf, int bsize)
int filled = 0;
memcpy(&size, xb + pos, sizeof(int));
- while (size > sizeof(int) && size <= xb_size && (pos + size) < xb_size
- && !filled) {
+ while (size > sizeof(int) &&
+ size <= xb_size &&
+ (pos + size) < xb_size &&
+ !filled) {
pos += sizeof(int);
size -= sizeof(int);
name_len = strnlen((YCHAR *) (xb + pos), size);
@@ -185,7 +191,7 @@ int nval_list(const char *xb, int xb_size, char *buf, int bsize)
ncopied += (name_len + 1);
} else {
filled = 1;
- }
+ }
pos += size;
if (pos < xb_size - sizeof(int))
memcpy(&size, xb + pos, sizeof(int));
diff --git a/yaffs_nameval.h b/yaffs_nameval.h
index 2bb02b6..951e64f 100644
--- a/yaffs_nameval.h
+++ b/yaffs_nameval.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_nand.c b/yaffs_nand.c
index 25b5213..165d010 100644
--- a/yaffs_nand.c
+++ b/yaffs_nand.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -13,31 +13,30 @@
#include "yaffs_nand.h"
#include "yaffs_tagscompat.h"
-#include "yaffs_tagsvalidity.h"
#include "yaffs_getblockinfo.h"
+#include "yaffs_summary.h"
int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
- u8 * buffer, struct yaffs_ext_tags *tags)
+ u8 *buffer, struct yaffs_ext_tags *tags)
{
int result;
struct yaffs_ext_tags local_tags;
-
- int realigned_chunk = nand_chunk - dev->chunk_offset;
+ int flash_chunk = nand_chunk - dev->chunk_offset;
dev->n_page_reads++;
- /* If there are no tags provided, use local tags to get prioritised gc working */
+ /* If there are no tags provided use local tags. */
if (!tags)
tags = &local_tags;
if (dev->param.read_chunk_tags_fn)
result =
- dev->param.read_chunk_tags_fn(dev, realigned_chunk, buffer,
+ dev->param.read_chunk_tags_fn(dev, flash_chunk, buffer,
tags);
else
result = yaffs_tags_compat_rd(dev,
- realigned_chunk, buffer, tags);
+ flash_chunk, buffer, tags);
if (tags && tags->ecc_result > YAFFS_ECC_RESULT_NO_ERROR) {
struct yaffs_block_info *bi;
@@ -46,65 +45,61 @@ int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
dev->param.chunks_per_block);
yaffs_handle_chunk_error(dev, bi);
}
-
return result;
}
int yaffs_wr_chunk_tags_nand(struct yaffs_dev *dev,
- int nand_chunk,
- const u8 * buffer, struct yaffs_ext_tags *tags)
+ int nand_chunk,
+ const u8 *buffer, struct yaffs_ext_tags *tags)
{
+ int result;
+ int flash_chunk = nand_chunk - dev->chunk_offset;
dev->n_page_writes++;
- nand_chunk -= dev->chunk_offset;
-
if (tags) {
tags->seq_number = dev->seq_number;
tags->chunk_used = 1;
- if (!yaffs_validate_tags(tags)) {
- yaffs_trace(YAFFS_TRACE_ERROR, "Writing uninitialised tags");
- YBUG();
- }
yaffs_trace(YAFFS_TRACE_WRITE,
"Writing chunk %d tags %d %d",
nand_chunk, tags->obj_id, tags->chunk_id);
} else {
yaffs_trace(YAFFS_TRACE_ERROR, "Writing with no tags");
- YBUG();
+ BUG();
return YAFFS_FAIL;
}
if (dev->param.write_chunk_tags_fn)
- return dev->param.write_chunk_tags_fn(dev, nand_chunk, buffer,
- tags);
+ result = dev->param.write_chunk_tags_fn(dev, flash_chunk,
+ buffer, tags);
else
- return yaffs_tags_compat_wr(dev, nand_chunk, buffer, tags);
+ result = yaffs_tags_compat_wr(dev, flash_chunk, buffer, tags);
+
+ yaffs_summary_add(dev, tags, nand_chunk);
+
+ return result;
}
int yaffs_mark_bad(struct yaffs_dev *dev, int block_no)
{
block_no -= dev->block_offset;
-
if (dev->param.bad_block_fn)
return dev->param.bad_block_fn(dev, block_no);
- else
- return yaffs_tags_compat_mark_bad(dev, block_no);
+
+ return yaffs_tags_compat_mark_bad(dev, block_no);
}
int yaffs_query_init_block_state(struct yaffs_dev *dev,
int block_no,
enum yaffs_block_state *state,
- u32 * seq_number)
+ u32 *seq_number)
{
block_no -= dev->block_offset;
-
if (dev->param.query_block_fn)
return dev->param.query_block_fn(dev, block_no, state,
seq_number);
- else
- return yaffs_tags_compat_query_block(dev, block_no,
- state, seq_number);
+
+ return yaffs_tags_compat_query_block(dev, block_no, state, seq_number);
}
int yaffs_erase_block(struct yaffs_dev *dev, int flash_block)
@@ -112,11 +107,8 @@ int yaffs_erase_block(struct yaffs_dev *dev, int flash_block)
int result;
flash_block -= dev->block_offset;
-
dev->n_erasures++;
-
result = dev->param.erase_fn(dev, flash_block);
-
return result;
}
diff --git a/yaffs_nand.h b/yaffs_nand.h
index 543f198..7134662 100644
--- a/yaffs_nand.h
+++ b/yaffs_nand.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -18,11 +18,11 @@
#include "yaffs_guts.h"
int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
- u8 * buffer, struct yaffs_ext_tags *tags);
+ u8 *buffer, struct yaffs_ext_tags *tags);
int yaffs_wr_chunk_tags_nand(struct yaffs_dev *dev,
int nand_chunk,
- const u8 * buffer, struct yaffs_ext_tags *tags);
+ const u8 *buffer, struct yaffs_ext_tags *tags);
int yaffs_mark_bad(struct yaffs_dev *dev, int block_no);
diff --git a/yaffs_packedtags1.c b/yaffs_packedtags1.c
index a77f095..dd9a331 100644
--- a/yaffs_packedtags1.c
+++ b/yaffs_packedtags1.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -14,6 +14,14 @@
#include "yaffs_packedtags1.h"
#include "yportenv.h"
+static const u8 all_ff[20] = {
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff
+};
+
void yaffs_pack_tags1(struct yaffs_packed_tags1 *pt,
const struct yaffs_ext_tags *t)
{
@@ -24,21 +32,16 @@ void yaffs_pack_tags1(struct yaffs_packed_tags1 *pt,
pt->ecc = 0;
pt->deleted = (t->is_deleted) ? 0 : 1;
pt->unused_stuff = 0;
- pt->should_be_ff = 0xFFFFFFFF;
-
+ pt->should_be_ff = 0xffffffff;
}
void yaffs_unpack_tags1(struct yaffs_ext_tags *t,
const struct yaffs_packed_tags1 *pt)
{
- static const u8 all_ff[] =
- { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff
- };
if (memcmp(all_ff, pt, sizeof(struct yaffs_packed_tags1))) {
t->block_bad = 0;
- if (pt->should_be_ff != 0xFFFFFFFF)
+ if (pt->should_be_ff != 0xffffffff)
t->block_bad = 1;
t->chunk_used = 1;
t->obj_id = pt->obj_id;
diff --git a/yaffs_packedtags1.h b/yaffs_packedtags1.h
index d6861ff..b80f0a5 100644
--- a/yaffs_packedtags1.h
+++ b/yaffs_packedtags1.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_packedtags2.c b/yaffs_packedtags2.c
index 8e7fea3..820bc41 100644
--- a/yaffs_packedtags2.c
+++ b/yaffs_packedtags2.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -14,7 +14,6 @@
#include "yaffs_packedtags2.h"
#include "yportenv.h"
#include "yaffs_trace.h"
-#include "yaffs_tagsvalidity.h"
/* This code packs a set of extended tags into a binary structure for
* NAND storage
@@ -32,14 +31,14 @@
#define EXTRA_SHADOWS_FLAG 0x20000000
#define EXTRA_SPARE_FLAGS 0x10000000
-#define ALL_EXTRA_FLAGS 0xF0000000
+#define ALL_EXTRA_FLAGS 0xf0000000
/* Also, the top 4 bits of the object Id are set to the object type. */
#define EXTRA_OBJECT_TYPE_SHIFT (28)
-#define EXTRA_OBJECT_TYPE_MASK ((0x0F) << EXTRA_OBJECT_TYPE_SHIFT)
+#define EXTRA_OBJECT_TYPE_MASK ((0x0f) << EXTRA_OBJECT_TYPE_SHIFT)
-static void yaffs_dump_packed_tags2_tags_only(const struct
- yaffs_packed_tags2_tags_only *ptt)
+static void yaffs_dump_packed_tags2_tags_only(
+ const struct yaffs_packed_tags2_tags_only *ptt)
{
yaffs_trace(YAFFS_TRACE_MTD,
"packed tags obj %d chunk %d byte %d seq %d",
@@ -100,78 +99,65 @@ void yaffs_pack_tags2(struct yaffs_packed_tags2 *pt,
if (tags_ecc)
yaffs_ecc_calc_other((unsigned char *)&pt->t,
- sizeof(struct
- yaffs_packed_tags2_tags_only),
- &pt->ecc);
+ sizeof(struct yaffs_packed_tags2_tags_only),
+ &pt->ecc);
}
void yaffs_unpack_tags2_tags_only(struct yaffs_ext_tags *t,
struct yaffs_packed_tags2_tags_only *ptt)
{
-
memset(t, 0, sizeof(struct yaffs_ext_tags));
- yaffs_init_tags(t);
-
- if (ptt->seq_number != 0xFFFFFFFF) {
- t->block_bad = 0;
- t->chunk_used = 1;
- t->obj_id = ptt->obj_id;
- t->chunk_id = ptt->chunk_id;
- t->n_bytes = ptt->n_bytes;
- t->is_deleted = 0;
- t->serial_number = 0;
- t->seq_number = ptt->seq_number;
-
- /* Do extra header info stuff */
-
- if (ptt->chunk_id & EXTRA_HEADER_INFO_FLAG) {
- t->chunk_id = 0;
- t->n_bytes = 0;
-
- t->extra_available = 1;
- t->extra_parent_id =
- ptt->chunk_id & (~(ALL_EXTRA_FLAGS));
- t->extra_is_shrink =
- (ptt->chunk_id & EXTRA_SHRINK_FLAG) ? 1 : 0;
- t->extra_shadows =
- (ptt->chunk_id & EXTRA_SHADOWS_FLAG) ? 1 : 0;
- t->extra_obj_type =
- ptt->obj_id >> EXTRA_OBJECT_TYPE_SHIFT;
- t->obj_id &= ~EXTRA_OBJECT_TYPE_MASK;
-
- if (t->extra_obj_type == YAFFS_OBJECT_TYPE_HARDLINK)
- t->extra_equiv_id = ptt->n_bytes;
- else
- t->extra_length = ptt->n_bytes;
- }
- }
+ if (ptt->seq_number == 0xffffffff)
+ return;
+
+ t->block_bad = 0;
+ t->chunk_used = 1;
+ t->obj_id = ptt->obj_id;
+ t->chunk_id = ptt->chunk_id;
+ t->n_bytes = ptt->n_bytes;
+ t->is_deleted = 0;
+ t->serial_number = 0;
+ t->seq_number = ptt->seq_number;
+
+ /* Do extra header info stuff */
+ if (ptt->chunk_id & EXTRA_HEADER_INFO_FLAG) {
+ t->chunk_id = 0;
+ t->n_bytes = 0;
+
+ t->extra_available = 1;
+ t->extra_parent_id = ptt->chunk_id & (~(ALL_EXTRA_FLAGS));
+ t->extra_is_shrink = ptt->chunk_id & EXTRA_SHRINK_FLAG ? 1 : 0;
+ t->extra_shadows = ptt->chunk_id & EXTRA_SHADOWS_FLAG ? 1 : 0;
+ t->extra_obj_type = ptt->obj_id >> EXTRA_OBJECT_TYPE_SHIFT;
+ t->obj_id &= ~EXTRA_OBJECT_TYPE_MASK;
+ if (t->extra_obj_type == YAFFS_OBJECT_TYPE_HARDLINK)
+ t->extra_equiv_id = ptt->n_bytes;
+ else
+ t->extra_length = ptt->n_bytes;
+ }
yaffs_dump_packed_tags2_tags_only(ptt);
yaffs_dump_tags2(t);
-
}
void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt,
int tags_ecc)
{
-
enum yaffs_ecc_result ecc_result = YAFFS_ECC_RESULT_NO_ERROR;
- if (pt->t.seq_number != 0xFFFFFFFF && tags_ecc) {
+ if (pt->t.seq_number != 0xffffffff && tags_ecc) {
/* Chunk is in use and we need to do ECC */
struct yaffs_ecc_other ecc;
int result;
yaffs_ecc_calc_other((unsigned char *)&pt->t,
- sizeof(struct
- yaffs_packed_tags2_tags_only),
- &ecc);
+ sizeof(struct yaffs_packed_tags2_tags_only),
+ &ecc);
result =
yaffs_ecc_correct_other((unsigned char *)&pt->t,
- sizeof(struct
- yaffs_packed_tags2_tags_only),
- &pt->ecc, &ecc);
+ sizeof(struct yaffs_packed_tags2_tags_only),
+ &pt->ecc, &ecc);
switch (result) {
case 0:
ecc_result = YAFFS_ECC_RESULT_NO_ERROR;
@@ -186,7 +172,6 @@ void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt,
ecc_result = YAFFS_ECC_RESULT_UNKNOWN;
}
}
-
yaffs_unpack_tags2_tags_only(t, &pt->t);
t->ecc_result = ecc_result;
diff --git a/yaffs_packedtags2.h b/yaffs_packedtags2.h
index f329669..675e719 100644
--- a/yaffs_packedtags2.h
+++ b/yaffs_packedtags2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_summary.c b/yaffs_summary.c
new file mode 100644
index 0000000..4cf1711
--- /dev/null
+++ b/yaffs_summary.c
@@ -0,0 +1,252 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ * for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <charles@aleph1.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/* Summaries write the useful part of the tags for the chunks in a block into an
+ * an array which is written to the last n chunks of the block.
+ * Reading the summaries gives all the tags for the block in one read. Much
+ * faster.
+ *
+ * Chunks holding summaries are marked with tags making it look like
+ * they are part of a fake file.
+ *
+ * The summary could also be used during gc.
+ *
+ */
+
+#include "yaffs_summary.h"
+#include "yaffs_packedtags2.h"
+#include "yaffs_nand.h"
+#include "yaffs_getblockinfo.h"
+#include "yaffs_bitmap.h"
+
+/* Summary tags don't need the sequence number because that is redundant. */
+struct yaffs_summary_tags {
+ unsigned obj_id;
+ unsigned chunk_id;
+ unsigned n_bytes;
+};
+
+static void yaffs_summary_clear(struct yaffs_dev *dev)
+{
+ if(!dev->sum_tags)
+ return;
+ memset(dev->sum_tags, 0, dev->chunks_per_summary *
+ sizeof(struct yaffs_summary_tags));
+}
+
+int yaffs_summary_init(struct yaffs_dev *dev)
+{
+ int sum_bytes;
+ int chunks_used; /* Number of chunks used by summary */
+
+ sum_bytes = dev->param.chunks_per_block *
+ sizeof(struct yaffs_summary_tags);
+
+ chunks_used = (sum_bytes + dev->data_bytes_per_chunk - 1)/
+ dev->data_bytes_per_chunk;
+ dev->chunks_per_summary = dev->param.chunks_per_block - chunks_used;
+ dev->sum_tags = kmalloc(sizeof(struct yaffs_summary_tags) *
+ dev->chunks_per_summary, GFP_NOFS);
+ dev->gc_sum_tags = kmalloc(sizeof(struct yaffs_summary_tags) *
+ dev->chunks_per_summary, GFP_NOFS);
+ if(!dev->sum_tags || !dev->gc_sum_tags) {
+ kfree(dev->sum_tags);
+ kfree(dev->gc_sum_tags);
+ return YAFFS_FAIL;
+ }
+
+ yaffs_summary_clear(dev);
+
+ return YAFFS_OK;
+}
+
+void yaffs_summary_deinit(struct yaffs_dev *dev)
+{
+ kfree(dev->sum_tags);
+ dev->sum_tags = NULL;
+ kfree(dev->gc_sum_tags);
+ dev->gc_sum_tags = NULL;
+ dev->chunks_per_summary = 0;
+}
+
+static int yaffs_summary_write(struct yaffs_dev *dev, int blk)
+{
+ struct yaffs_ext_tags tags;
+ u8 *buffer;
+ u8 *sum_buffer = (u8 *)dev->sum_tags;
+ int n_bytes;
+ int chunk_in_nand;
+ int chunk_in_block;
+ int result;
+ int this_tx;
+ struct yaffs_block_info *bi = yaffs_get_block_info(dev, blk);
+
+ buffer = yaffs_get_temp_buffer(dev);
+ n_bytes = sizeof(struct yaffs_summary_tags) * dev->chunks_per_summary;
+ memset(&tags, 0, sizeof(struct yaffs_ext_tags));
+ tags.obj_id = YAFFS_OBJECTID_SUMMARY;
+ tags.chunk_id = 1;
+ chunk_in_block = dev->chunks_per_summary;
+ chunk_in_nand = dev->alloc_block * dev->param.chunks_per_block +
+ dev-> chunks_per_summary;
+ do {
+ this_tx = n_bytes;
+ if (this_tx > dev->data_bytes_per_chunk)
+ this_tx = dev->data_bytes_per_chunk;
+ memcpy(buffer, sum_buffer, this_tx);
+ tags.n_bytes = this_tx;
+ result = yaffs_wr_chunk_tags_nand(dev, chunk_in_nand,
+ buffer, &tags);
+
+ if (result != YAFFS_OK)
+ break;
+ yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+ bi->pages_in_use++;
+ dev->n_free_chunks--;
+
+ n_bytes -= this_tx;
+ sum_buffer += this_tx;
+ chunk_in_nand++;
+ chunk_in_block++;
+ tags.chunk_id++;
+ } while (result == YAFFS_OK && n_bytes > 0);
+ yaffs_release_temp_buffer(dev, buffer);
+
+
+ if (result == YAFFS_OK)
+ bi->has_summary = 1;
+
+
+ return result;
+}
+
+int yaffs_summary_read(struct yaffs_dev *dev,
+ struct yaffs_summary_tags *st,
+ int blk)
+{
+ struct yaffs_ext_tags tags;
+ u8 *buffer;
+ u8 *sum_buffer = (u8 *)st;
+ int n_bytes;
+ int chunk_id;
+ int chunk_in_nand;
+ int chunk_in_block;
+ int result;
+ int this_tx;
+ struct yaffs_block_info *bi = yaffs_get_block_info(dev, blk);
+
+ buffer = yaffs_get_temp_buffer(dev);
+ n_bytes = sizeof(struct yaffs_summary_tags) * dev->chunks_per_summary;
+ chunk_in_block = dev->chunks_per_summary;
+ chunk_in_nand = blk * dev->param.chunks_per_block +
+ dev->chunks_per_summary;
+ chunk_id = 1;
+ do {
+ this_tx = n_bytes;
+ if(this_tx > dev->data_bytes_per_chunk)
+ this_tx = dev->data_bytes_per_chunk;
+ result = yaffs_rd_chunk_tags_nand(dev, chunk_in_nand,
+ buffer, &tags);
+
+ if (tags.chunk_id != chunk_id ||
+ tags.obj_id != YAFFS_OBJECTID_SUMMARY ||
+ tags.chunk_used == 0 ||
+ tags.ecc_result > YAFFS_ECC_RESULT_FIXED ||
+ this_tx != tags.n_bytes)
+ result = YAFFS_FAIL;
+ if (result != YAFFS_OK)
+ break;
+
+ if (st == dev->sum_tags) {
+ /* If we're scanning then update the block info */
+ yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+ bi->pages_in_use++;
+ }
+
+ memcpy(sum_buffer, buffer, this_tx);
+ n_bytes -= this_tx;
+ sum_buffer += this_tx;
+ chunk_in_nand++;
+ chunk_in_block++;
+ chunk_id++;
+ } while (result == YAFFS_OK && n_bytes > 0);
+ yaffs_release_temp_buffer(dev, buffer);
+
+ if (st == dev->sum_tags && result == YAFFS_OK)
+ bi->has_summary = 1;
+
+ return result;
+}
+int yaffs_summary_add(struct yaffs_dev *dev,
+ struct yaffs_ext_tags *tags,
+ int chunk_in_nand)
+{
+ struct yaffs_packed_tags2_tags_only tags_only;
+ struct yaffs_summary_tags *sum_tags;
+ int block_in_nand = chunk_in_nand / dev->param.chunks_per_block;
+ int chunk_in_block = chunk_in_nand % dev->param.chunks_per_block;
+
+ if(!dev->sum_tags)
+ return YAFFS_OK;
+
+ if(chunk_in_block >= 0 && chunk_in_block < dev->chunks_per_summary) {
+ yaffs_pack_tags2_tags_only(&tags_only, tags);
+ sum_tags = &dev->sum_tags[chunk_in_block];
+ sum_tags->chunk_id = tags_only.chunk_id;
+ sum_tags->n_bytes = tags_only.n_bytes;
+ sum_tags->obj_id = tags_only.obj_id;
+
+ if(chunk_in_block == dev->chunks_per_summary - 1) {
+ /* Time to write out the summary */
+ yaffs_summary_write(dev, block_in_nand);
+ yaffs_summary_clear(dev);
+ yaffs_skip_rest_of_block(dev);
+ }
+ }
+ return YAFFS_OK;
+}
+
+int yaffs_summary_fetch(struct yaffs_dev *dev,
+ struct yaffs_ext_tags *tags,
+ int chunk_in_block)
+{
+ struct yaffs_packed_tags2_tags_only tags_only;
+ struct yaffs_summary_tags *sum_tags;
+ if(chunk_in_block >= 0 && chunk_in_block < dev->chunks_per_summary) {
+ sum_tags = &dev->sum_tags[chunk_in_block];
+ tags_only.chunk_id = sum_tags->chunk_id;
+ tags_only.n_bytes = sum_tags->n_bytes;
+ tags_only.obj_id = sum_tags->obj_id;
+ yaffs_unpack_tags2_tags_only(tags, &tags_only);
+ return YAFFS_OK;
+ }
+ return YAFFS_FAIL;
+}
+
+void yaffs_summary_gc(struct yaffs_dev *dev, int blk)
+{
+ struct yaffs_block_info *bi = yaffs_get_block_info(dev, blk);
+ int i;
+
+ if (!bi->has_summary)
+ return;
+
+ for (i = dev->chunks_per_summary; i < dev->param.chunks_per_block; i++) {
+ if( yaffs_check_chunk_bit(dev, blk, i)) {
+ yaffs_clear_chunk_bit(dev, blk, i);
+ bi->pages_in_use--;
+ dev->n_free_chunks++;
+ }
+ }
+
+}
diff --git a/yaffs_summary.h b/yaffs_summary.h
new file mode 100644
index 0000000..be141d0
--- /dev/null
+++ b/yaffs_summary.h
@@ -0,0 +1,37 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ * for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <charles@aleph1.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __YAFFS_SUMMARY_H__
+#define __YAFFS_SUMMARY_H__
+
+#include "yaffs_packedtags2.h"
+
+
+int yaffs_summary_init(struct yaffs_dev *dev);
+void yaffs_summary_deinit(struct yaffs_dev *dev);
+
+int yaffs_summary_add(struct yaffs_dev *dev,
+ struct yaffs_ext_tags *tags,
+ int chunk_in_block);
+int yaffs_summary_fetch(struct yaffs_dev *dev,
+ struct yaffs_ext_tags *tags,
+ int chunk_in_block);
+int yaffs_summary_read(struct yaffs_dev *dev,
+ struct yaffs_summary_tags *st,
+ int blk);
+void yaffs_summary_gc(struct yaffs_dev *dev, int blk);
+
+
+#endif
diff --git a/yaffs_tagscompat.c b/yaffs_tagscompat.c
index 818f72b..9ac5896 100644
--- a/yaffs_tagscompat.c
+++ b/yaffs_tagscompat.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -22,16 +22,15 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk);
/********** Tags ECC calculations *********/
-void yaffs_calc_ecc(const u8 * data, struct yaffs_spare *spare)
+void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
{
- yaffs_ecc_cacl(data, spare->ecc1);
- yaffs_ecc_cacl(&data[256], spare->ecc2);
+ yaffs_ecc_calc(data, spare->ecc1);
+ yaffs_ecc_calc(&data[256], spare->ecc2);
}
void yaffs_calc_tags_ecc(struct yaffs_tags *tags)
{
/* Calculate an ecc */
-
unsigned char *b = ((union yaffs_tags_union *)tags)->as_bytes;
unsigned i, j;
unsigned ecc = 0;
@@ -46,9 +45,7 @@ void yaffs_calc_tags_ecc(struct yaffs_tags *tags)
ecc ^= bit;
}
}
-
tags->ecc = ecc;
-
}
int yaffs_check_tags_ecc(struct yaffs_tags *tags)
@@ -76,7 +73,6 @@ int yaffs_check_tags_ecc(struct yaffs_tags *tags)
/* TODO Need to do somethiong here */
return -1; /* unrecovered error */
}
-
return 0;
}
@@ -124,11 +120,11 @@ static void yaffs_get_tags_from_spare(struct yaffs_dev *dev,
static void yaffs_spare_init(struct yaffs_spare *spare)
{
- memset(spare, 0xFF, sizeof(struct yaffs_spare));
+ memset(spare, 0xff, sizeof(struct yaffs_spare));
}
static int yaffs_wr_nand(struct yaffs_dev *dev,
- int nand_chunk, const u8 * data,
+ int nand_chunk, const u8 *data,
struct yaffs_spare *spare)
{
if (nand_chunk < dev->param.start_block * dev->param.chunks_per_block) {
@@ -143,7 +139,7 @@ static int yaffs_wr_nand(struct yaffs_dev *dev,
static int yaffs_rd_chunk_nand(struct yaffs_dev *dev,
int nand_chunk,
- u8 * data,
+ u8 *data,
struct yaffs_spare *spare,
enum yaffs_ecc_result *ecc_result,
int correct_errors)
@@ -166,10 +162,10 @@ static int yaffs_rd_chunk_nand(struct yaffs_dev *dev,
int ecc_result1, ecc_result2;
u8 calc_ecc[3];
- yaffs_ecc_cacl(data, calc_ecc);
+ yaffs_ecc_calc(data, calc_ecc);
ecc_result1 =
yaffs_ecc_correct(data, spare->ecc1, calc_ecc);
- yaffs_ecc_cacl(&data[256], calc_ecc);
+ yaffs_ecc_calc(&data[256], calc_ecc);
ecc_result2 =
yaffs_ecc_correct(&data[256], spare->ecc2,
calc_ecc);
@@ -268,9 +264,8 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk)
int flash_block = nand_chunk / dev->param.chunks_per_block;
/* Mark the block for retirement */
- yaffs_get_block_info(dev,
- flash_block + dev->block_offset)->needs_retiring =
- 1;
+ yaffs_get_block_info(dev, flash_block + dev->block_offset)->
+ needs_retiring = 1;
yaffs_trace(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
"**>>Block %d marked for retirement",
flash_block);
@@ -284,20 +279,20 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk)
int yaffs_tags_compat_wr(struct yaffs_dev *dev,
int nand_chunk,
- const u8 * data, const struct yaffs_ext_tags *ext_tags)
+ const u8 *data, const struct yaffs_ext_tags *ext_tags)
{
struct yaffs_spare spare;
struct yaffs_tags tags;
yaffs_spare_init(&spare);
-
+
if (ext_tags->is_deleted)
spare.page_status = 0;
else {
tags.obj_id = ext_tags->obj_id;
tags.chunk_id = ext_tags->chunk_id;
- tags.n_bytes_lsb = ext_tags->n_bytes & 0x3ff;
+ tags.n_bytes_lsb = ext_tags->n_bytes & (1024 - 1);
if (dev->data_bytes_per_chunk >= 1024)
tags.n_bytes_msb = (ext_tags->n_bytes >> 10) & 3;
@@ -310,69 +305,61 @@ int yaffs_tags_compat_wr(struct yaffs_dev *dev,
yaffs_calc_ecc(data, &spare);
yaffs_load_tags_to_spare(&spare, &tags);
-
}
-
return yaffs_wr_nand(dev, nand_chunk, data, &spare);
}
int yaffs_tags_compat_rd(struct yaffs_dev *dev,
int nand_chunk,
- u8 * data, struct yaffs_ext_tags *ext_tags)
+ u8 *data, struct yaffs_ext_tags *ext_tags)
{
-
struct yaffs_spare spare;
struct yaffs_tags tags;
enum yaffs_ecc_result ecc_result = YAFFS_ECC_RESULT_UNKNOWN;
-
static struct yaffs_spare spare_ff;
static int init;
+ int deleted;
if (!init) {
- memset(&spare_ff, 0xFF, sizeof(spare_ff));
+ memset(&spare_ff, 0xff, sizeof(spare_ff));
init = 1;
}
- if (yaffs_rd_chunk_nand(dev, nand_chunk, data, &spare, &ecc_result, 1)) {
- /* ext_tags may be NULL */
- if (ext_tags) {
-
- int deleted =
- (hweight8(spare.page_status) < 7) ? 1 : 0;
+ if (!yaffs_rd_chunk_nand(dev, nand_chunk,
+ data, &spare, &ecc_result, 1))
+ return YAFFS_FAIL;
- ext_tags->is_deleted = deleted;
- ext_tags->ecc_result = ecc_result;
- ext_tags->block_bad = 0; /* We're reading it */
- /* therefore it is not a bad block */
- ext_tags->chunk_used =
- (memcmp(&spare_ff, &spare, sizeof(spare_ff)) !=
- 0) ? 1 : 0;
+ /* ext_tags may be NULL */
+ if (!ext_tags)
+ return YAFFS_OK;
- if (ext_tags->chunk_used) {
- yaffs_get_tags_from_spare(dev, &spare, &tags);
+ deleted = (hweight8(spare.page_status) < 7) ? 1 : 0;
- ext_tags->obj_id = tags.obj_id;
- ext_tags->chunk_id = tags.chunk_id;
- ext_tags->n_bytes = tags.n_bytes_lsb;
+ ext_tags->is_deleted = deleted;
+ ext_tags->ecc_result = ecc_result;
+ ext_tags->block_bad = 0; /* We're reading it */
+ /* therefore it is not a bad block */
+ ext_tags->chunk_used =
+ memcmp(&spare_ff, &spare, sizeof(spare_ff)) ? 1 : 0;
- if (dev->data_bytes_per_chunk >= 1024)
- ext_tags->n_bytes |=
- (((unsigned)tags.
- n_bytes_msb) << 10);
+ if (ext_tags->chunk_used) {
+ yaffs_get_tags_from_spare(dev, &spare, &tags);
+ ext_tags->obj_id = tags.obj_id;
+ ext_tags->chunk_id = tags.chunk_id;
+ ext_tags->n_bytes = tags.n_bytes_lsb;
- ext_tags->serial_number = tags.serial_number;
- }
- }
+ if (dev->data_bytes_per_chunk >= 1024)
+ ext_tags->n_bytes |=
+ (((unsigned)tags.n_bytes_msb) << 10);
- return YAFFS_OK;
- } else {
- return YAFFS_FAIL;
+ ext_tags->serial_number = tags.serial_number;
}
+
+ return YAFFS_OK;
}
int yaffs_tags_compat_mark_bad(struct yaffs_dev *dev, int flash_block)
{
-
struct yaffs_spare spare;
memset(&spare, 0xff, sizeof(struct yaffs_spare));
@@ -385,22 +372,20 @@ int yaffs_tags_compat_mark_bad(struct yaffs_dev *dev, int flash_block)
NULL, &spare);
return YAFFS_OK;
-
}
int yaffs_tags_compat_query_block(struct yaffs_dev *dev,
int block_no,
enum yaffs_block_state *state,
- u32 * seq_number)
+ u32 *seq_number)
{
-
struct yaffs_spare spare0, spare1;
static struct yaffs_spare spare_ff;
static int init;
enum yaffs_ecc_result dummy;
if (!init) {
- memset(&spare_ff, 0xFF, sizeof(spare_ff));
+ memset(&spare_ff, 0xff, sizeof(spare_ff));
init = 1;
}
@@ -416,7 +401,7 @@ int yaffs_tags_compat_query_block(struct yaffs_dev *dev,
else if (memcmp(&spare_ff, &spare0, sizeof(spare_ff)) == 0)
*state = YAFFS_BLOCK_STATE_EMPTY;
else
- *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+ *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
return YAFFS_OK;
}
diff --git a/yaffs_tagscompat.h b/yaffs_tagscompat.h
index 8cd35dc..b3c6655 100644
--- a/yaffs_tagscompat.h
+++ b/yaffs_tagscompat.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -19,15 +19,15 @@
#include "yaffs_guts.h"
int yaffs_tags_compat_wr(struct yaffs_dev *dev,
int nand_chunk,
- const u8 * data, const struct yaffs_ext_tags *tags);
+ const u8 *data, const struct yaffs_ext_tags *tags);
int yaffs_tags_compat_rd(struct yaffs_dev *dev,
int nand_chunk,
- u8 * data, struct yaffs_ext_tags *tags);
+ u8 *data, struct yaffs_ext_tags *tags);
int yaffs_tags_compat_mark_bad(struct yaffs_dev *dev, int block_no);
int yaffs_tags_compat_query_block(struct yaffs_dev *dev,
int block_no,
enum yaffs_block_state *state,
- u32 * seq_number);
+ u32 *seq_number);
void yaffs_calc_tags_ecc(struct yaffs_tags *tags);
int yaffs_check_tags_ecc(struct yaffs_tags *tags);
diff --git a/yaffs_tagsvalidity.c b/yaffs_tagsvalidity.c
deleted file mode 100644
index 4358d79..0000000
--- a/yaffs_tagsvalidity.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
- *
- * Copyright (C) 2002-2010 Aleph One Ltd.
- * for Toby Churchill Ltd and Brightstar Engineering
- *
- * Created by Charles Manning <charles@aleph1.co.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include "yaffs_tagsvalidity.h"
-
-void yaffs_init_tags(struct yaffs_ext_tags *tags)
-{
- memset(tags, 0, sizeof(struct yaffs_ext_tags));
- tags->validity0 = 0xAAAAAAAA;
- tags->validity1 = 0x55555555;
-}
-
-int yaffs_validate_tags(struct yaffs_ext_tags *tags)
-{
- return (tags->validity0 == 0xAAAAAAAA && tags->validity1 == 0x55555555);
-
-}
diff --git a/yaffs_trace.h b/yaffs_trace.h
index 6273dbf..fd26054 100644
--- a/yaffs_trace.h
+++ b/yaffs_trace.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -43,7 +43,7 @@ extern unsigned int yaffs_wr_attempts;
#define YAFFS_TRACE_VERIFY 0x00010000
#define YAFFS_TRACE_VERIFY_NAND 0x00020000
#define YAFFS_TRACE_VERIFY_FULL 0x00040000
-#define YAFFS_TRACE_VERIFY_ALL 0x000F0000
+#define YAFFS_TRACE_VERIFY_ALL 0x000f0000
#define YAFFS_TRACE_SYNC 0x00100000
#define YAFFS_TRACE_BACKGROUND 0x00200000
@@ -52,6 +52,6 @@ extern unsigned int yaffs_wr_attempts;
#define YAFFS_TRACE_ERROR 0x40000000
#define YAFFS_TRACE_BUG 0x80000000
-#define YAFFS_TRACE_ALWAYS 0xF0000000
+#define YAFFS_TRACE_ALWAYS 0xf0000000
#endif
diff --git a/yaffs_verify.c b/yaffs_verify.c
index 55884b9..b3e540d 100644
--- a/yaffs_verify.c
+++ b/yaffs_verify.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -36,9 +36,9 @@ static int yaffs_skip_nand_verification(struct yaffs_dev *dev)
return !(yaffs_trace_mask & (YAFFS_TRACE_VERIFY_NAND));
}
-static const char *block_state_name[] = {
+static const char * const block_state_name[] = {
"Unknown",
- "Needs scanning",
+ "Needs scan",
"Scanning",
"Empty",
"Allocating",
@@ -66,7 +66,7 @@ void yaffs_verify_blk(struct yaffs_dev *dev, struct yaffs_block_info *bi, int n)
switch (bi->block_state) {
case YAFFS_BLOCK_STATE_UNKNOWN:
case YAFFS_BLOCK_STATE_SCANNING:
- case YAFFS_BLOCK_STATE_NEEDS_SCANNING:
+ case YAFFS_BLOCK_STATE_NEEDS_SCAN:
yaffs_trace(YAFFS_TRACE_VERIFY,
"Block %d has bad run-state %s",
n, block_state_name[bi->block_state]);
@@ -76,11 +76,11 @@ void yaffs_verify_blk(struct yaffs_dev *dev, struct yaffs_block_info *bi, int n)
actually_used = bi->pages_in_use - bi->soft_del_pages;
- if (bi->pages_in_use < 0
- || bi->pages_in_use > dev->param.chunks_per_block
- || bi->soft_del_pages < 0
- || bi->soft_del_pages > dev->param.chunks_per_block
- || actually_used < 0 || actually_used > dev->param.chunks_per_block)
+ if (bi->pages_in_use < 0 ||
+ bi->pages_in_use > dev->param.chunks_per_block ||
+ bi->soft_del_pages < 0 ||
+ bi->soft_del_pages > dev->param.chunks_per_block ||
+ actually_used < 0 || actually_used > dev->param.chunks_per_block)
yaffs_trace(YAFFS_TRACE_VERIFY,
"Block %d has illegal values pages_in_used %d soft_del_pages %d",
n, bi->pages_in_use, bi->soft_del_pages);
@@ -91,7 +91,6 @@ void yaffs_verify_blk(struct yaffs_dev *dev, struct yaffs_block_info *bi, int n)
yaffs_trace(YAFFS_TRACE_VERIFY,
"Block %d has inconsistent values pages_in_use %d counted chunk bits %d",
n, bi->pages_in_use, in_use);
-
}
void yaffs_verify_collected_blk(struct yaffs_dev *dev,
@@ -215,9 +214,9 @@ void yaffs_verify_oh(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh,
"Obj %d header name is NULL",
obj->obj_id);
- if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff) /* Trashed name */
+ if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff) /* Junk name */
yaffs_trace(YAFFS_TRACE_VERIFY,
- "Obj %d header name is 0xFF",
+ "Obj %d header name is 0xff",
obj->obj_id);
}
@@ -226,6 +225,7 @@ void yaffs_verify_file(struct yaffs_obj *obj)
int required_depth;
int actual_depth;
u32 last_chunk;
+ u32 the_chunk;
u32 x;
u32 i;
struct yaffs_dev *dev;
@@ -265,17 +265,18 @@ void yaffs_verify_file(struct yaffs_obj *obj)
for (i = 1; i <= last_chunk; i++) {
tn = yaffs_find_tnode_0(dev, &obj->variant.file_variant, i);
- if (tn) {
- u32 the_chunk = yaffs_get_group_base(dev, tn, i);
- if (the_chunk > 0) {
- yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL,
- &tags);
- if (tags.obj_id != obj_id || tags.chunk_id != i)
+ if (!tn)
+ continue;
+
+ the_chunk = yaffs_get_group_base(dev, tn, i);
+ if (the_chunk > 0) {
+ yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL,
+ &tags);
+ if (tags.obj_id != obj_id || tags.chunk_id != i)
yaffs_trace(YAFFS_TRACE_VERIFY,
"Object %d chunk_id %d NAND mismatch chunk %d tags (%d:%d)",
- obj_id, i, the_chunk,
- tags.obj_id, tags.chunk_id);
- }
+ obj_id, i, the_chunk,
+ tags.obj_id, tags.chunk_id);
}
}
}
@@ -305,10 +306,8 @@ void yaffs_verify_special(struct yaffs_obj *obj)
void yaffs_verify_obj(struct yaffs_obj *obj)
{
struct yaffs_dev *dev;
-
u32 chunk_min;
u32 chunk_max;
-
u32 chunk_id_ok;
u32 chunk_in_range;
u32 chunk_wrongly_deleted;
@@ -350,7 +349,7 @@ void yaffs_verify_obj(struct yaffs_obj *obj)
if (chunk_valid && !yaffs_skip_nand_verification(dev)) {
struct yaffs_ext_tags tags;
struct yaffs_obj_hdr *oh;
- u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+ u8 *buffer = yaffs_get_temp_buffer(dev);
oh = (struct yaffs_obj_hdr *)buffer;
@@ -358,7 +357,7 @@ void yaffs_verify_obj(struct yaffs_obj *obj)
yaffs_verify_oh(obj, oh, &tags, 1);
- yaffs_release_temp_buffer(dev, buffer, __LINE__);
+ yaffs_release_temp_buffer(dev, buffer);
}
/* Verify it has a parent */
@@ -369,8 +368,8 @@ void yaffs_verify_obj(struct yaffs_obj *obj)
}
/* Verify parent is a directory */
- if (obj->parent
- && obj->parent->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
+ if (obj->parent &&
+ obj->parent->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_VERIFY,
"Obj %d's parent is not a directory (type %d)",
obj->obj_id, obj->parent->variant_type);
@@ -414,7 +413,7 @@ void yaffs_verify_objects(struct yaffs_dev *dev)
for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
list_for_each(lh, &dev->obj_bucket[i].list) {
- obj = list_entry(lh, struct yaffs_obj, hash_link);
+ obj = list_entry(lh, struct yaffs_obj, hash_link);
yaffs_verify_obj(obj);
}
}
@@ -424,12 +423,11 @@ void yaffs_verify_obj_in_dir(struct yaffs_obj *obj)
{
struct list_head *lh;
struct yaffs_obj *list_obj;
-
int count = 0;
if (!obj) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "No object to verify");
- YBUG();
+ BUG();
return;
}
@@ -437,14 +435,14 @@ void yaffs_verify_obj_in_dir(struct yaffs_obj *obj)
return;
if (!obj->parent) {
- yaffs_trace(YAFFS_TRACE_ALWAYS, "Object does not have parent" );
- YBUG();
+ yaffs_trace(YAFFS_TRACE_ALWAYS, "Object does not have parent");
+ BUG();
return;
}
if (obj->parent->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "Parent is not directory");
- YBUG();
+ BUG();
}
/* Iterate through the objects in each hash entry */
@@ -460,7 +458,7 @@ void yaffs_verify_obj_in_dir(struct yaffs_obj *obj)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"Object in directory %d times",
count);
- YBUG();
+ BUG();
}
}
@@ -470,7 +468,7 @@ void yaffs_verify_dir(struct yaffs_obj *directory)
struct yaffs_obj *list_obj;
if (!directory) {
- YBUG();
+ BUG();
return;
}
@@ -481,7 +479,7 @@ void yaffs_verify_dir(struct yaffs_obj *directory)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"Directory has wrong type: %d",
directory->variant_type);
- YBUG();
+ BUG();
}
/* Iterate through the objects in each hash entry */
@@ -492,7 +490,7 @@ void yaffs_verify_dir(struct yaffs_obj *directory)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"Object in directory list has wrong parent %p",
list_obj->parent);
- YBUG();
+ BUG();
}
yaffs_verify_obj_in_dir(list_obj);
}
@@ -514,7 +512,7 @@ void yaffs_verify_free_chunks(struct yaffs_dev *dev)
if (difference) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
- "Freechunks verification failure %d %d %d",
+ "Freechunks verification failure %d %d %d",
dev->n_free_chunks, counted, difference);
yaffs_free_verification_failures++;
}
@@ -525,4 +523,3 @@ int yaffs_verify_file_sane(struct yaffs_obj *in)
in = in;
return YAFFS_OK;
}
-
diff --git a/yaffs_verify.h b/yaffs_verify.h
index cc6f889..4f4af8d 100644
--- a/yaffs_verify.h
+++ b/yaffs_verify.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_vfs_multi.c b/yaffs_vfs_multi.c
index 78e2f9f..b8e5124 100644
--- a/yaffs_vfs_multi.c
+++ b/yaffs_vfs_multi.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -39,24 +39,24 @@
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10))
#define YAFFS_COMPILE_BACKGROUND
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6, 23))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23))
#define YAFFS_COMPILE_FREEZER
#endif
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28))
#define YAFFS_COMPILE_EXPORTFS
#endif
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35))
#define YAFFS_USE_SETATTR_COPY
#define YAFFS_USE_TRUNCATE_SETSIZE
#endif
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35))
#define YAFFS_HAS_EVICT_INODE
#endif
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13))
#define YAFFS_NEW_FOLLOW_LINK 1
#else
#define YAFFS_NEW_FOLLOW_LINK 0
@@ -72,7 +72,9 @@
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/proc_fs.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39))
#include <linux/smp_lock.h>
+#endif
#include <linux/pagemap.h>
#include <linux/mtd/mtd.h>
#include <linux/interrupt.h>
@@ -126,7 +128,7 @@
#define YPROC_ROOT NULL
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26))
#define Y_INIT_TIMER(a) init_timer(a)
#else
#define Y_INIT_TIMER(a) init_timer_on_stack(a)
@@ -176,7 +178,7 @@ unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
unsigned int yaffs_auto_checkpoint = 1;
unsigned int yaffs_gc_control = 1;
unsigned int yaffs_bg_enable = 1;
-
+unsigned int yaffs_auto_select = 1;
/* Module Parameters */
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
module_param(yaffs_trace_mask, uint, 0644);
@@ -210,7 +212,8 @@ static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino);
#define yaffs_inode_to_obj_lv(iptr) ((iptr)->u.generic_ip)
#endif
-#define yaffs_inode_to_obj(iptr) ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
+#define yaffs_inode_to_obj(iptr) \
+ ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
#define yaffs_dentry_to_obj(dptr) yaffs_inode_to_obj((dptr)->d_inode)
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
@@ -221,12 +224,12 @@ static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino);
#define update_dir_time(dir) do {\
(dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \
- } while(0)
+ } while (0)
static void yaffs_put_super(struct super_block *sb);
static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
- loff_t * pos);
+ loff_t *pos);
static ssize_t yaffs_hold_space(struct file *f);
static void yaffs_release_space(struct file *f);
@@ -236,7 +239,9 @@ static int yaffs_file_flush(struct file *file, fl_owner_t id);
static int yaffs_file_flush(struct file *file);
#endif
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static int yaffs_sync_object(struct file *file, loff_t start, loff_t end, int datasync);
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
static int yaffs_sync_object(struct file *file, int datasync);
#else
static int yaffs_sync_object(struct file *file, struct dentry *dentry,
@@ -306,14 +311,12 @@ static int yaffs_writepage(struct page *page, struct writeback_control *wbc);
static int yaffs_writepage(struct page *page);
#endif
-#ifdef CONFIG_YAFFS_XATTR
static int yaffs_setxattr(struct dentry *dentry, const char *name,
const void *value, size_t size, int flags);
-static ssize_t yaffs_getxattr(struct dentry *dentry, const char *name, void *buff,
- size_t size);
+static ssize_t yaffs_getxattr(struct dentry *dentry, const char *name,
+ void *buff, size_t size);
static int yaffs_removexattr(struct dentry *dentry, const char *name);
static ssize_t yaffs_listxattr(struct dentry *dentry, char *buff, size_t size);
-#endif
#if (YAFFS_USE_WRITE_BEGIN_END != 0)
static int yaffs_write_begin(struct file *filp, struct address_space *mapping,
@@ -396,7 +399,7 @@ static const struct file_operations yaffs_file_operations = {
};
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25))
static void zero_user_segment(struct page *page, unsigned start, unsigned end)
{
void *kaddr = kmap_atomic(page, KM_USER0);
@@ -408,12 +411,10 @@ static void zero_user_segment(struct page *page, unsigned start, unsigned end)
static const struct inode_operations yaffs_file_inode_operations = {
.setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
.setxattr = yaffs_setxattr,
.getxattr = yaffs_getxattr,
.listxattr = yaffs_listxattr,
.removexattr = yaffs_removexattr,
-#endif
};
static const struct inode_operations yaffs_symlink_inode_operations = {
@@ -423,12 +424,10 @@ static const struct inode_operations yaffs_symlink_inode_operations = {
.put_link = yaffs_put_link,
#endif
.setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
.setxattr = yaffs_setxattr,
.getxattr = yaffs_getxattr,
.listxattr = yaffs_listxattr,
.removexattr = yaffs_removexattr,
-#endif
};
static const struct inode_operations yaffs_dir_inode_operations = {
@@ -442,12 +441,10 @@ static const struct inode_operations yaffs_dir_inode_operations = {
.mknod = yaffs_mknod,
.rename = yaffs_rename,
.setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
.setxattr = yaffs_setxattr,
.getxattr = yaffs_getxattr,
.listxattr = yaffs_listxattr,
.removexattr = yaffs_removexattr,
-#endif
};
static const struct file_operations yaffs_dir_operations = {
@@ -479,7 +476,7 @@ static const struct super_operations yaffs_super_ops = {
static int yaffs_vfs_setattr(struct inode *inode, struct iattr *attr)
{
-#ifdef YAFFS_USE_SETATTR_COPY
+#ifdef YAFFS_USE_SETATTR_COPY
setattr_copy(inode, attr);
return 0;
#else
@@ -490,7 +487,7 @@ static int yaffs_vfs_setattr(struct inode *inode, struct iattr *attr)
static int yaffs_vfs_setsize(struct inode *inode, loff_t newsize)
{
-#ifdef YAFFS_USE_TRUNCATE_SETSIZE
+#ifdef YAFFS_USE_TRUNCATE_SETSIZE
truncate_setsize(inode, newsize);
return 0;
#else
@@ -791,7 +788,7 @@ static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry)
if (current != yaffs_dev_to_lc(dev)->readdir_process)
yaffs_gross_lock(dev);
- yaffs_trace(YAFFS_TRACE_OS,"yaffs_lookup for %d:%s",
+ yaffs_trace(YAFFS_TRACE_OS, "yaffs_lookup for %d:%s",
yaffs_inode_to_obj(dir)->obj_id, dentry->d_name.name);
obj = yaffs_find_by_name(yaffs_inode_to_obj(dir), dentry->d_name.name);
@@ -1833,7 +1830,9 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
return -ENOMEM;
}
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static int yaffs_sync_object(struct file *file, loff_t start, loff_t end, int datasync)
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
static int yaffs_sync_object(struct file *file, int datasync)
#else
static int yaffs_sync_object(struct file *file, struct dentry *dentry,
@@ -1961,7 +1960,6 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
return error;
}
-#ifdef CONFIG_YAFFS_XATTR
static int yaffs_setxattr(struct dentry *dentry, const char *name,
const void *value, size_t size, int flags)
{
@@ -2064,7 +2062,6 @@ static ssize_t yaffs_listxattr(struct dentry * dentry, char *buff, size_t size)
return error;
}
-#endif
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -2226,7 +2223,7 @@ static int yaffs_do_sync_fs(struct super_block *sb, int request_checkpoint)
* yaffs_bg_start() launches the background thread.
* yaffs_bg_stop() cleans up the background thread.
*
- * NB:
+ * NB:
* The thread should only run after the yaffs is initialised
* The thread should be stopped before yaffs is unmounted.
* The thread should not do any writing while the fs is in read only.
@@ -2533,6 +2530,7 @@ struct yaffs_options {
int lazy_loading_overridden;
int empty_lost_and_found;
int empty_lost_and_found_overridden;
+ int disable_summary;
};
#define MAX_OPT_LEN 30
@@ -2574,6 +2572,8 @@ static int yaffs_parse_options(struct yaffs_options *options,
} else if (!strcmp(cur_opt, "lazy-loading-on")) {
options->lazy_loading_enabled = 1;
options->lazy_loading_overridden = 1;
+ } else if (!strcmp(cur_opt, "disable-summary")) {
+ options->disable_summary = 1;
} else if (!strcmp(cur_opt, "empty-lost-and-found-off")) {
options->empty_lost_and_found = 0;
options->empty_lost_and_found_overridden = 1;
@@ -2708,9 +2708,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
yaffs_trace(YAFFS_TRACE_OS, " size %lld", mtd->size);
#endif
-#ifdef CONFIG_YAFFS_AUTO_YAFFS2
-
- if (yaffs_version == 1 && WRITE_SIZE(mtd) >= 2048) {
+ if (yaffs_auto_select && yaffs_version == 1 && WRITE_SIZE(mtd) >= 2048) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs2");
yaffs_version = 2;
}
@@ -2721,7 +2719,6 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs1");
yaffs_version = 1;
}
-#endif
if (yaffs_version == 2) {
/* Check for version 2 style functions */
@@ -2838,40 +2835,18 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
param->n_caches = (options.no_cache) ? 0 : 10;
param->inband_tags = options.inband_tags;
-#ifdef CONFIG_YAFFS_DISABLE_LAZY_LOAD
- param->disable_lazy_load = 1;
-#endif
-#ifdef CONFIG_YAFFS_XATTR
param->enable_xattr = 1;
-#endif
if (options.lazy_loading_overridden)
param->disable_lazy_load = !options.lazy_loading_enabled;
-#ifdef CONFIG_YAFFS_DISABLE_TAGS_ECC
- param->no_tags_ecc = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_BACKGROUND
-#else
param->defered_dir_update = 1;
-#endif
if (options.tags_ecc_overridden)
param->no_tags_ecc = !options.tags_ecc_on;
-#ifdef CONFIG_YAFFS_EMPTY_LOST_AND_FOUND
param->empty_lost_n_found = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING
- param->refresh_period = 0;
-#else
param->refresh_period = 500;
-#endif
-
-#ifdef CONFIG_YAFFS__ALWAYS_CHECK_CHUNK_ERASED
- param->always_check_erased = 1;
-#endif
+ param->disable_summary = options.disable_summary;
if (options.empty_lost_and_found_overridden)
param->empty_lost_n_found = options.empty_lost_and_found;
@@ -2882,7 +2857,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
param->read_chunk_tags_fn = nandmtd2_read_chunk_tags;
param->bad_block_fn = nandmtd2_mark_block_bad;
param->query_block_fn = nandmtd2_query_block;
- yaffs_dev_to_lc(dev)->spare_buffer =
+ yaffs_dev_to_lc(dev)->spare_buffer =
kmalloc(mtd->oobsize, GFP_NOFS);
param->is_yaffs2 = 1;
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
@@ -2920,13 +2895,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
yaffs_dev_to_lc(dev)->super = sb;
-#ifndef CONFIG_YAFFS_DOES_ECC
param->use_nand_ecc = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_WIDE_TNODES
- param->wide_tnodes_disabled = 1;
-#endif
param->skip_checkpt_rd = options.skip_checkpoint_read;
param->skip_checkpt_wr = options.skip_checkpoint_write;
@@ -2960,7 +2929,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
err = yaffs_guts_initialise(dev);
- yaffs_trace(YAFFS_TRACE_OS,
+ yaffs_trace(YAFFS_TRACE_OS,
"yaffs_read_super: guts initialised %s",
(err == YAFFS_OK) ? "OK" : "FAILED");
@@ -3010,7 +2979,13 @@ static int yaffs_internal_read_super_mtd(struct super_block *sb, void *data,
return yaffs_internal_read_super(1, sb, data, silent) ? 0 : -EINVAL;
}
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static struct dentry *yaffs_mount(struct file_system_type *fs_type, int flags,
+ const char *dev_name, void *data)
+{
+ return mount_bdev(fs_type, flags, dev_name, data, yaffs_internal_read_super_mtd);
+}
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
static int yaffs_read_super(struct file_system_type *fs,
int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
@@ -3033,8 +3008,12 @@ static struct super_block *yaffs_read_super(struct file_system_type *fs,
static struct file_system_type yaffs_fs_type = {
.owner = THIS_MODULE,
.name = "yaffs",
- .get_sb = yaffs_read_super,
- .kill_sb = kill_block_super,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+ .mount = yaffs_mount,
+#else
+ .get_sb = yaffs_read_super,
+#endif
+ .kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
#else
@@ -3048,7 +3027,6 @@ static DECLARE_FSTYPE(yaffs_fs_type, "yaffs", yaffs_read_super,
FS_REQUIRES_DEV);
#endif
-#ifdef CONFIG_YAFFS_YAFFS2
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
@@ -3057,7 +3035,13 @@ static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
return yaffs_internal_read_super(2, sb, data, silent) ? 0 : -EINVAL;
}
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static struct dentry *yaffs2_mount(struct file_system_type *fs_type, int flags,
+ const char *dev_name, void *data)
+{
+ return mount_bdev(fs_type, flags, dev_name, data, yaffs2_internal_read_super_mtd);
+}
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
static int yaffs2_read_super(struct file_system_type *fs,
int flags, const char *dev_name, void *data,
struct vfsmount *mnt)
@@ -3079,8 +3063,12 @@ static struct super_block *yaffs2_read_super(struct file_system_type *fs,
static struct file_system_type yaffs2_fs_type = {
.owner = THIS_MODULE,
.name = "yaffs2",
- .get_sb = yaffs2_read_super,
- .kill_sb = kill_block_super,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+ .mount = yaffs2_mount,
+#else
+ .get_sb = yaffs2_read_super,
+#endif
+ .kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
#else
@@ -3094,7 +3082,6 @@ static DECLARE_FSTYPE(yaffs2_fs_type, "yaffs2", yaffs2_read_super,
FS_REQUIRES_DEV);
#endif
-#endif /* CONFIG_YAFFS_YAFFS2 */
static struct proc_dir_entry *my_proc_entry;
@@ -3151,8 +3138,8 @@ static char *yaffs_dump_dev_part1(char *buf, struct yaffs_dev *dev)
dev->oldest_dirty_gc_count);
buf += sprintf(buf, "n_gc_blocks.......... %u\n", dev->n_gc_blocks);
buf += sprintf(buf, "bg_gcs............... %u\n", dev->bg_gcs);
- buf += sprintf(buf, "n_retired_writes..... %u\n",
- dev->n_retired_writes);
+ buf += sprintf(buf, "n_retried_writes..... %u\n",
+ dev->n_retried_writes);
buf += sprintf(buf, "n_retired_blocks..... %u\n",
dev->n_retired_blocks);
buf += sprintf(buf, "n_ecc_fixed.......... %u\n", dev->n_ecc_fixed);
@@ -3167,6 +3154,8 @@ static char *yaffs_dump_dev_part1(char *buf, struct yaffs_dev *dev)
dev->n_unlinked_files);
buf += sprintf(buf, "refresh_count........ %u\n", dev->refresh_count);
buf += sprintf(buf, "n_bg_deletions....... %u\n", dev->n_bg_deletions);
+ buf += sprintf(buf, "tags_used............ %u\n", dev->tags_used);
+ buf += sprintf(buf, "summary_used......... %u\n", dev->summary_used);
return buf;
}
@@ -3393,12 +3382,6 @@ static int __init init_yaffs_fs(void)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"yaffs built " __DATE__ " " __TIME__ " Installing.");
-#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
- yaffs_trace(YAFFS_TRACE_ALWAYS,
- " \n\n\n\nYAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.\n\n\n\n"
- );
-#endif
-
mutex_init(&yaffs_context_lock);
/* Install the proc_fs entries */
@@ -3465,5 +3448,5 @@ module_init(init_yaffs_fs)
module_exit(exit_yaffs_fs)
MODULE_DESCRIPTION("YAFFS2 - a NAND specific flash file system");
-MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2010");
+MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2011");
MODULE_LICENSE("GPL");
diff --git a/yaffs_vfs_single.c b/yaffs_vfs_single.c
index 1893125..f822845 100644
--- a/yaffs_vfs_single.c
+++ b/yaffs_vfs_single.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -36,7 +36,6 @@
* a single version and should not include any multi-version code.
*/
#include <linux/version.h>
-
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
@@ -54,27 +53,8 @@
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/freezer.h>
-
#include <asm/div64.h>
-
#include <linux/statfs.h>
-
-#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf)
-
-#define YPROC_ROOT NULL
-
-#define Y_INIT_TIMER(a) init_timer_on_stack(a)
-
-#define WRITE_SIZE_STR "writesize"
-#define WRITE_SIZE(mtd) ((mtd)->writesize)
-
-static uint32_t YCALCBLOCKS(uint64_t partition_size, uint32_t block_size)
-{
- uint64_t result = partition_size;
- do_div(result, block_size);
- return (uint32_t) result;
-}
-
#include <linux/uaccess.h>
#include <linux/mtd/mtd.h>
@@ -82,9 +62,7 @@ static uint32_t YCALCBLOCKS(uint64_t partition_size, uint32_t block_size)
#include "yaffs_trace.h"
#include "yaffs_guts.h"
#include "yaffs_attribs.h"
-
#include "yaffs_linux.h"
-
#include "yaffs_mtdif.h"
#include "yaffs_mtdif1.h"
#include "yaffs_mtdif2.h"
@@ -94,6 +72,7 @@ unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
unsigned int yaffs_auto_checkpoint = 1;
unsigned int yaffs_gc_control = 1;
unsigned int yaffs_bg_enable = 1;
+unsigned int yaffs_auto_select = 1;
/* Module Parameters */
module_param(yaffs_trace_mask, uint, 0644);
@@ -101,16 +80,27 @@ module_param(yaffs_wr_attempts, uint, 0644);
module_param(yaffs_auto_checkpoint, uint, 0644);
module_param(yaffs_gc_control, uint, 0644);
module_param(yaffs_bg_enable, uint, 0644);
+module_param(yaffs_auto_select, uint, 0644);
+
+#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf)
+
+static uint32_t YCALCBLOCKS(uint64_t partition_size, uint32_t block_size)
+{
+ uint64_t result = partition_size;
+ do_div(result, block_size);
+ return (uint32_t) result;
+}
#define yaffs_inode_to_obj_lv(iptr) ((iptr)->i_private)
-#define yaffs_inode_to_obj(iptr) ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
+#define yaffs_inode_to_obj(iptr)\
+ ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
#define yaffs_dentry_to_obj(dptr) yaffs_inode_to_obj((dptr)->d_inode)
#define yaffs_super_to_dev(sb) ((struct yaffs_dev *)sb->s_fs_info)
#define update_dir_time(dir) do {\
(dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \
- } while(0)
+ } while (0)
static unsigned yaffs_gc_control_callback(struct yaffs_dev *dev)
@@ -156,7 +146,6 @@ static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino)
yaffs_gross_lock(dev);
obj = yaffs_find_by_number(dev, inode->i_ino);
-
yaffs_fill_inode_from_obj(inode, obj);
yaffs_gross_unlock(dev);
@@ -203,13 +192,10 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
dev_t rdev)
{
struct inode *inode;
-
struct yaffs_obj *obj = NULL;
struct yaffs_dev *dev;
-
struct yaffs_obj *parent = yaffs_inode_to_obj(dir);
-
- int error = -ENOSPC;
+ int error;
uid_t uid = current->cred->fsuid;
gid_t gid =
(dir->i_mode & S_ISGID) ? dir->i_gid : current->cred->fsgid;
@@ -217,17 +203,17 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
if ((dir->i_mode & S_ISGID) && S_ISDIR(mode))
mode |= S_ISGID;
- if (parent) {
- yaffs_trace(YAFFS_TRACE_OS,
- "yaffs_mknod: parent object %d type %d",
- parent->obj_id, parent->variant_type);
- } else {
+ if (!parent) {
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_mknod: could not get parent object");
return -EPERM;
}
yaffs_trace(YAFFS_TRACE_OS,
+ "yaffs_mknod: parent object %d type %d",
+ parent->obj_id, parent->variant_type);
+
+ yaffs_trace(YAFFS_TRACE_OS,
"yaffs_mknod: making oject for %s, mode %x dev %x",
dentry->d_name.name, mode, rdev);
@@ -235,6 +221,11 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
yaffs_gross_lock(dev);
+ if (yaffs_get_n_free_chunks(dev) < 1) {
+ error = -ENOSPC;
+ goto err_out;
+ }
+
switch (mode & S_IFMT) {
default:
/* Special (socket, fifo, device...) */
@@ -259,24 +250,29 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
break;
}
+ if (!obj) {
+ error = -ENOMEM;
+ goto err_out;
+ }
+
/* Can not call yaffs_get_inode() with gross lock held */
yaffs_gross_unlock(dev);
- if (obj) {
- inode = yaffs_get_inode(dir->i_sb, mode, rdev, obj);
- d_instantiate(dentry, inode);
- update_dir_time(dir);
- yaffs_trace(YAFFS_TRACE_OS,
- "yaffs_mknod created object %d count = %d",
- obj->obj_id, atomic_read(&inode->i_count));
- error = 0;
- yaffs_fill_inode_from_obj(dir, parent);
- } else {
- yaffs_trace(YAFFS_TRACE_OS, "yaffs_mknod failed making object");
- error = -ENOMEM;
- }
+ inode = yaffs_get_inode(dir->i_sb, mode, rdev, obj);
+ d_instantiate(dentry, inode);
+ update_dir_time(dir);
+ yaffs_trace(YAFFS_TRACE_OS,
+ "yaffs_mknod created object %d count = %d",
+ obj->obj_id, atomic_read(&inode->i_count));
+ yaffs_fill_inode_from_obj(dir, parent);
+ return 0;
+
+err_out:
+ yaffs_gross_unlock(dev);
+ yaffs_trace(YAFFS_TRACE_OS, "yaffs_mknod error %d", error);
return error;
+
}
static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
@@ -335,6 +331,7 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
{
struct yaffs_obj *obj;
struct yaffs_dev *dev;
+ struct inode *inode;
uid_t uid = current->cred->fsuid;
gid_t gid =
(dir->i_mode & S_ISGID) ? dir->i_gid : current->cred->fsgid;
@@ -347,19 +344,17 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
S_IFLNK | S_IRWXUGO, uid, gid, symname);
yaffs_gross_unlock(dev);
- if (obj) {
- struct inode *inode;
-
- inode = yaffs_get_inode(dir->i_sb, obj->yst_mode, 0, obj);
- d_instantiate(dentry, inode);
- update_dir_time(dir);
- yaffs_trace(YAFFS_TRACE_OS, "symlink created OK");
- return 0;
- } else {
+ if (!obj) {
yaffs_trace(YAFFS_TRACE_OS, "symlink not created");
+ return -ENOMEM;
}
- return -ENOMEM;
+ inode = yaffs_get_inode(dir->i_sb, obj->yst_mode, 0, obj);
+ d_instantiate(dentry, inode);
+ update_dir_time(dir);
+ yaffs_trace(YAFFS_TRACE_OS, "symlink created OK");
+
+ return 0;
}
static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry,
@@ -367,7 +362,6 @@ static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry,
{
struct yaffs_obj *obj;
struct inode *inode = NULL;
-
struct yaffs_dev *dev = yaffs_inode_to_obj(dir)->my_dev;
if (current != yaffs_dev_to_lc(dev)->readdir_process)
@@ -411,7 +405,6 @@ static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry,
static int yaffs_unlink(struct inode *dir, struct dentry *dentry)
{
int ret_val;
-
struct yaffs_dev *dev;
struct yaffs_obj *obj;
@@ -512,6 +505,7 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
struct inode *inode = dentry->d_inode;
int error = 0;
struct yaffs_dev *dev;
+ int result;
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_setattr of object %d",
@@ -521,17 +515,15 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
if (attr->ia_valid & ATTR_SIZE && (attr->ia_size >> 31))
error = -EINVAL;
- if (error == 0)
+ if (!error)
error = inode_change_ok(inode, attr);
- if (error == 0) {
- int result;
- if (!error) {
- setattr_copy(inode, attr);
- yaffs_trace(YAFFS_TRACE_OS, "inode_setattr called");
- if (attr->ia_valid & ATTR_SIZE) {
- truncate_setsize(inode, attr->ia_size);
- inode->i_blocks = (inode->i_size + 511) >> 9;
- }
+
+ if (!error) {
+ setattr_copy(inode, attr);
+ yaffs_trace(YAFFS_TRACE_OS, "inode_setattr called");
+ if (attr->ia_valid & ATTR_SIZE) {
+ truncate_setsize(inode, attr->ia_size);
+ inode->i_blocks = (inode->i_size + 511) >> 9;
}
dev = yaffs_inode_to_obj(inode)->my_dev;
if (attr->ia_valid & ATTR_SIZE) {
@@ -539,15 +531,12 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
(int)(attr->ia_size),
(int)(attr->ia_size));
}
+
yaffs_gross_lock(dev);
result = yaffs_set_attribs(yaffs_inode_to_obj(inode), attr);
- if (result == YAFFS_OK) {
- error = 0;
- } else {
+ if (result != YAFFS_OK)
error = -EPERM;
- }
yaffs_gross_unlock(dev);
-
}
yaffs_trace(YAFFS_TRACE_OS, "yaffs_setattr done returning %d", error);
@@ -555,39 +544,31 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
return error;
}
-#ifdef CONFIG_YAFFS_XATTR
static int yaffs_setxattr(struct dentry *dentry, const char *name,
const void *value, size_t size, int flags)
{
struct inode *inode = dentry->d_inode;
- int error = 0;
+ int error;
struct yaffs_dev *dev;
struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
yaffs_trace(YAFFS_TRACE_OS, "yaffs_setxattr of object %d", obj->obj_id);
- if (error == 0) {
- int result;
- dev = obj->my_dev;
- yaffs_gross_lock(dev);
- result = yaffs_set_xattrib(obj, name, value, size, flags);
- if (result == YAFFS_OK)
- error = 0;
- else if (result < 0)
- error = result;
- yaffs_gross_unlock(dev);
+ dev = obj->my_dev;
+ yaffs_gross_lock(dev);
+ error = yaffs_set_xattrib(obj, name, value, size, flags);
+ yaffs_gross_unlock(dev);
- }
yaffs_trace(YAFFS_TRACE_OS, "yaffs_setxattr done returning %d", error);
return error;
}
-static ssize_t yaffs_getxattr(struct dentry * dentry, const char *name, void *buff,
- size_t size)
+static ssize_t yaffs_getxattr(struct dentry *dentry, const char *name,
+ void *buff, size_t size)
{
struct inode *inode = dentry->d_inode;
- int error = 0;
+ int error;
struct yaffs_dev *dev;
struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
@@ -595,13 +576,11 @@ static ssize_t yaffs_getxattr(struct dentry * dentry, const char *name, void *bu
"yaffs_getxattr \"%s\" from object %d",
name, obj->obj_id);
- if (error == 0) {
- dev = obj->my_dev;
- yaffs_gross_lock(dev);
- error = yaffs_get_xattrib(obj, name, buff, size);
- yaffs_gross_unlock(dev);
+ dev = obj->my_dev;
+ yaffs_gross_lock(dev);
+ error = yaffs_get_xattrib(obj, name, buff, size);
+ yaffs_gross_unlock(dev);
- }
yaffs_trace(YAFFS_TRACE_OS, "yaffs_getxattr done returning %d", error);
return error;
@@ -610,56 +589,45 @@ static ssize_t yaffs_getxattr(struct dentry * dentry, const char *name, void *bu
static int yaffs_removexattr(struct dentry *dentry, const char *name)
{
struct inode *inode = dentry->d_inode;
- int error = 0;
+ int error;
struct yaffs_dev *dev;
struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_removexattr of object %d", obj->obj_id);
- if (error == 0) {
- int result;
- dev = obj->my_dev;
- yaffs_gross_lock(dev);
- result = yaffs_remove_xattrib(obj, name);
- if (result == YAFFS_OK)
- error = 0;
- else if (result < 0)
- error = result;
- yaffs_gross_unlock(dev);
+ dev = obj->my_dev;
+ yaffs_gross_lock(dev);
+ error = yaffs_remove_xattrib(obj, name);
+ yaffs_gross_unlock(dev);
- }
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_removexattr done returning %d", error);
return error;
}
-static ssize_t yaffs_listxattr(struct dentry * dentry, char *buff, size_t size)
+static ssize_t yaffs_listxattr(struct dentry *dentry, char *buff, size_t size)
{
struct inode *inode = dentry->d_inode;
- int error = 0;
+ int error;
struct yaffs_dev *dev;
struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_listxattr of object %d", obj->obj_id);
- if (error == 0) {
- dev = obj->my_dev;
- yaffs_gross_lock(dev);
- error = yaffs_list_xattrib(obj, buff, size);
- yaffs_gross_unlock(dev);
+ dev = obj->my_dev;
+ yaffs_gross_lock(dev);
+ error = yaffs_list_xattrib(obj, buff, size);
+ yaffs_gross_unlock(dev);
- }
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_listxattr done returning %d", error);
return error;
}
-#endif
-
static const struct inode_operations yaffs_dir_inode_operations = {
.create = yaffs_create,
.lookup = yaffs_lookup,
@@ -671,12 +639,10 @@ static const struct inode_operations yaffs_dir_inode_operations = {
.mknod = yaffs_mknod,
.rename = yaffs_rename,
.setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
.setxattr = yaffs_setxattr,
.getxattr = yaffs_getxattr,
.listxattr = yaffs_listxattr,
.removexattr = yaffs_removexattr,
-#endif
};
/*-----------------------------------------------------------------*/
/* Directory search context allows us to unlock access to yaffs during
@@ -715,18 +681,21 @@ static struct yaffs_search_context *yaffs_new_search(struct yaffs_obj *dir)
struct yaffs_dev *dev = dir->my_dev;
struct yaffs_search_context *sc =
kmalloc(sizeof(struct yaffs_search_context), GFP_NOFS);
- if (sc) {
- sc->dir_obj = dir;
- sc->dev = dev;
- if (list_empty(&sc->dir_obj->variant.dir_variant.children))
- sc->next_return = NULL;
- else
- sc->next_return =
- list_entry(dir->variant.dir_variant.children.next,
- struct yaffs_obj, siblings);
- INIT_LIST_HEAD(&sc->others);
- list_add(&sc->others, &(yaffs_dev_to_lc(dev)->search_contexts));
- }
+
+ if (!sc)
+ return NULL;
+
+ sc->dir_obj = dir;
+ sc->dev = dev;
+ if (list_empty(&sc->dir_obj->variant.dir_variant.children))
+ sc->next_return = NULL;
+ else
+ sc->next_return =
+ list_entry(dir->variant.dir_variant.children.next,
+ struct yaffs_obj, siblings);
+ INIT_LIST_HEAD(&sc->others);
+ list_add(&sc->others, &(yaffs_dev_to_lc(dev)->search_contexts));
+
return sc;
}
@@ -799,7 +768,6 @@ static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir)
unsigned long offset, curoffs;
struct yaffs_obj *l;
int ret_val = 0;
-
char name[YAFFS_MAX_NAME_LENGTH + 1];
obj = yaffs_dentry_to_obj(f->f_dentry);
@@ -909,11 +877,10 @@ static const struct file_operations yaffs_dir_operations = {
static int yaffs_file_flush(struct file *file, fl_owner_t id)
{
struct yaffs_obj *obj = yaffs_dentry_to_obj(file->f_dentry);
-
struct yaffs_dev *dev = obj->my_dev;
yaffs_trace(YAFFS_TRACE_OS,
- "yaffs_file_flush object %d (%s)",
+ "yaffs_file_flush object %d (%s)",
obj->obj_id, obj->dirty ? "dirty" : "clean");
yaffs_gross_lock(dev);
@@ -991,7 +958,6 @@ struct dentry *yaffs2_get_parent(struct dentry *dentry)
}
}
}
-
return parent;
}
@@ -1013,7 +979,6 @@ static int yaffs_readlink(struct dentry *dentry, char __user * buffer,
{
unsigned char *alias;
int ret;
-
struct yaffs_dev *dev = yaffs_dentry_to_obj(dentry)->my_dev;
yaffs_gross_lock(dev);
@@ -1127,7 +1092,6 @@ static int yaffs_readpage_nolock(struct file *f, struct page *pg)
struct yaffs_obj *obj;
unsigned char *pg_buf;
int ret;
-
struct yaffs_dev *dev;
yaffs_trace(YAFFS_TRACE_OS,
@@ -1172,6 +1136,7 @@ static int yaffs_readpage_nolock(struct file *f, struct page *pg)
static int yaffs_readpage_unlock(struct file *f, struct page *pg)
{
int ret = yaffs_readpage_nolock(f, pg);
+
unlock_page(pg);
return ret;
}
@@ -1268,18 +1233,17 @@ static int yaffs_writepage(struct page *page, struct writeback_control *wbc)
return (n_written == n_bytes) ? 0 : -ENOSPC;
}
-/* Space holding and freeing is done to ensure we have space available for
+/* Space holding and freeing is done to ensure we have space available for
* write_begin/end.
* For now we just assume few parallel writes and check against a small
* number.
- * Todo: need to do this with a counter to handle parallel reads better.
+ * Todo: need to do this with a counter to handle parallel reads better
*/
static ssize_t yaffs_hold_space(struct file *f)
{
struct yaffs_obj *obj;
struct yaffs_dev *dev;
-
int n_free_chunks;
obj = yaffs_dentry_to_obj(f->f_dentry);
@@ -1315,7 +1279,6 @@ static int yaffs_write_begin(struct file *filp, struct address_space *mapping,
{
struct page *pg = NULL;
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
-
int ret = 0;
int space_held = 0;
@@ -1365,7 +1328,7 @@ out:
}
static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
- loff_t * pos)
+ loff_t *pos)
{
struct yaffs_obj *obj;
int n_written, ipos;
@@ -1375,11 +1338,11 @@ static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
obj = yaffs_dentry_to_obj(f->f_dentry);
if (!obj) {
- /* This should not happen */
+ /* This should not happen */
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_file_write: hey obj is null!");
- return -ENINVAL;
- }
+ return -EINVAL;
+ }
dev = obj->my_dev;
@@ -1415,7 +1378,6 @@ static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
"yaffs_file_write size updated to %d bytes, %d blocks",
ipos, (int)(inode->i_blocks));
}
-
}
yaffs_gross_unlock(dev);
return (n_written == 0) && (n > 0) ? -ENOSPC : n_written;
@@ -1474,11 +1436,12 @@ static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf)
bytes_in_dev =
((uint64_t)
- ((dev->param.end_block - dev->param.start_block +
- 1))) * ((uint64_t) (dev->param.chunks_per_block *
+ ((dev->param.end_block - dev->param.start_block + 1))) *
+ ((uint64_t) (dev->param.chunks_per_block *
dev->data_bytes_per_chunk));
- do_div(bytes_in_dev, sb->s_blocksize); /* bytes_in_dev becomes the number of blocks */
+ do_div(bytes_in_dev, sb->s_blocksize);
+ /* bytes_in_dev becomes the number of blocks */
buf->f_blocks = bytes_in_dev;
bytes_free = ((uint64_t) (yaffs_get_n_free_chunks(dev))) *
@@ -1534,6 +1497,7 @@ static void yaffs_flush_inodes(struct super_block *sb)
static void yaffs_flush_super(struct super_block *sb, int do_checkpoint)
{
struct yaffs_dev *dev = yaffs_super_to_dev(sb);
+
if (!dev)
return;
@@ -1602,7 +1566,7 @@ static int yaffs_do_sync_fs(struct super_block *sb, int request_checkpoint)
* yaffs_bg_start() launches the background thread.
* yaffs_bg_stop() cleans up the background thread.
*
- * NB:
+ * NB:
* The thread should only run after the yaffs is initialised
* The thread should be stopped before yaffs is unmounted.
* The thread should not do any writing while the fs is in read only.
@@ -1622,7 +1586,6 @@ static int yaffs_bg_thread_fn(void *data)
unsigned long next_gc = now;
unsigned long expires;
unsigned int urgency;
-
int gc_result;
struct timer_list timer;
@@ -1659,12 +1622,12 @@ static int yaffs_bg_thread_fn(void *data)
else
next_gc = now + HZ * 2;
} else {
- /*
+ /*
* gc not running so set to next_dir_update
* to cut down on wake ups
*/
next_gc = next_dir_update;
- }
+ }
}
yaffs_gross_unlock(dev);
expires = next_dir_update;
@@ -1673,7 +1636,7 @@ static int yaffs_bg_thread_fn(void *data)
if (time_before(expires, now))
expires = now + HZ;
- Y_INIT_TIMER(&timer);
+ init_timer_on_stack(&timer);
timer.expires = expires + 1;
timer.data = (unsigned long)current;
timer.function = yaffs_background_waker;
@@ -1745,12 +1708,9 @@ static int yaffs_sync_fs(struct super_block *sb, int wait)
return 0;
}
-
static LIST_HEAD(yaffs_context_list);
struct mutex yaffs_context_lock;
-
-
struct yaffs_options {
int inband_tags;
int skip_checkpoint_read;
@@ -1766,7 +1726,7 @@ struct yaffs_options {
#define MAX_OPT_LEN 30
static int yaffs_parse_options(struct yaffs_options *options,
- const char *options_str)
+ const char *options_str)
{
char cur_opt[MAX_OPT_LEN + 1];
int p;
@@ -1824,11 +1784,10 @@ static int yaffs_parse_options(struct yaffs_options *options,
error = 1;
}
}
-
return error;
}
-static struct address_space_operations yaffs_file_address_operations = {
+static const struct address_space_operations yaffs_file_address_operations = {
.readpage = yaffs_readpage,
.writepage = yaffs_writepage,
.write_begin = yaffs_write_begin,
@@ -1839,12 +1798,10 @@ static struct address_space_operations yaffs_file_address_operations = {
static const struct inode_operations yaffs_file_inode_operations = {
.setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
.setxattr = yaffs_setxattr,
.getxattr = yaffs_getxattr,
.listxattr = yaffs_listxattr,
.removexattr = yaffs_removexattr,
-#endif
};
static const struct inode_operations yaffs_symlink_inode_operations = {
@@ -1852,104 +1809,97 @@ static const struct inode_operations yaffs_symlink_inode_operations = {
.follow_link = yaffs_follow_link,
.put_link = yaffs_put_link,
.setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
.setxattr = yaffs_setxattr,
.getxattr = yaffs_getxattr,
.listxattr = yaffs_listxattr,
.removexattr = yaffs_removexattr,
-#endif
};
static void yaffs_fill_inode_from_obj(struct inode *inode,
struct yaffs_obj *obj)
{
- if (inode && obj) {
-
- /* Check mode against the variant type and attempt to repair if broken. */
- u32 mode = obj->yst_mode;
- switch (obj->variant_type) {
- case YAFFS_OBJECT_TYPE_FILE:
- if (!S_ISREG(mode)) {
- obj->yst_mode &= ~S_IFMT;
- obj->yst_mode |= S_IFREG;
- }
+ u32 mode;
- break;
- case YAFFS_OBJECT_TYPE_SYMLINK:
- if (!S_ISLNK(mode)) {
- obj->yst_mode &= ~S_IFMT;
- obj->yst_mode |= S_IFLNK;
- }
+ if (!inode || !obj) {
+ yaffs_trace(YAFFS_TRACE_OS,
+ "yaffs_fill_inode invalid parameters");
+ return;
+ }
- break;
- case YAFFS_OBJECT_TYPE_DIRECTORY:
- if (!S_ISDIR(mode)) {
- obj->yst_mode &= ~S_IFMT;
- obj->yst_mode |= S_IFDIR;
- }
+ /* Check mode against the variant type
+ * and attempt to repair if broken. */
+ mode = obj->yst_mode;
- break;
- case YAFFS_OBJECT_TYPE_UNKNOWN:
- case YAFFS_OBJECT_TYPE_HARDLINK:
- case YAFFS_OBJECT_TYPE_SPECIAL:
- default:
- /* TODO? */
- break;
+ switch (obj->variant_type) {
+ case YAFFS_OBJECT_TYPE_FILE:
+ if (!S_ISREG(mode)) {
+ obj->yst_mode &= ~S_IFMT;
+ obj->yst_mode |= S_IFREG;
}
-
- inode->i_flags |= S_NOATIME;
-
- inode->i_ino = obj->obj_id;
- inode->i_mode = obj->yst_mode;
- inode->i_uid = obj->yst_uid;
- inode->i_gid = obj->yst_gid;
-
- inode->i_rdev = old_decode_dev(obj->yst_rdev);
-
- inode->i_atime.tv_sec = (time_t) (obj->yst_atime);
- inode->i_atime.tv_nsec = 0;
- inode->i_mtime.tv_sec = (time_t) obj->yst_mtime;
- inode->i_mtime.tv_nsec = 0;
- inode->i_ctime.tv_sec = (time_t) obj->yst_ctime;
- inode->i_ctime.tv_nsec = 0;
- inode->i_size = yaffs_get_obj_length(obj);
- inode->i_blocks = (inode->i_size + 511) >> 9;
-
- inode->i_nlink = yaffs_get_obj_link_count(obj);
-
- yaffs_trace(YAFFS_TRACE_OS,
- "yaffs_fill_inode mode %x uid %d gid %d size %d count %d",
- inode->i_mode, inode->i_uid, inode->i_gid,
- (int)inode->i_size, atomic_read(&inode->i_count));
-
- switch (obj->yst_mode & S_IFMT) {
- default: /* fifo, device or socket */
- init_special_inode(inode, obj->yst_mode,
- old_decode_dev(obj->yst_rdev));
- break;
- case S_IFREG: /* file */
- inode->i_op = &yaffs_file_inode_operations;
- inode->i_fop = &yaffs_file_operations;
- inode->i_mapping->a_ops =
- &yaffs_file_address_operations;
- break;
- case S_IFDIR: /* directory */
- inode->i_op = &yaffs_dir_inode_operations;
- inode->i_fop = &yaffs_dir_operations;
- break;
- case S_IFLNK: /* symlink */
- inode->i_op = &yaffs_symlink_inode_operations;
- break;
+ break;
+ case YAFFS_OBJECT_TYPE_SYMLINK:
+ if (!S_ISLNK(mode)) {
+ obj->yst_mode &= ~S_IFMT;
+ obj->yst_mode |= S_IFLNK;
+ }
+ break;
+ case YAFFS_OBJECT_TYPE_DIRECTORY:
+ if (!S_ISDIR(mode)) {
+ obj->yst_mode &= ~S_IFMT;
+ obj->yst_mode |= S_IFDIR;
}
+ break;
+ case YAFFS_OBJECT_TYPE_UNKNOWN:
+ case YAFFS_OBJECT_TYPE_HARDLINK:
+ case YAFFS_OBJECT_TYPE_SPECIAL:
+ default:
+ /* TODO? */
+ break;
+ }
- yaffs_inode_to_obj_lv(inode) = obj;
+ inode->i_flags |= S_NOATIME;
+ inode->i_ino = obj->obj_id;
+ inode->i_mode = obj->yst_mode;
+ inode->i_uid = obj->yst_uid;
+ inode->i_gid = obj->yst_gid;
- obj->my_inode = inode;
+ inode->i_rdev = old_decode_dev(obj->yst_rdev);
- } else {
- yaffs_trace(YAFFS_TRACE_OS,
- "yaffs_fill_inode invalid parameters");
+ inode->i_atime.tv_sec = (time_t) (obj->yst_atime);
+ inode->i_atime.tv_nsec = 0;
+ inode->i_mtime.tv_sec = (time_t) obj->yst_mtime;
+ inode->i_mtime.tv_nsec = 0;
+ inode->i_ctime.tv_sec = (time_t) obj->yst_ctime;
+ inode->i_ctime.tv_nsec = 0;
+ inode->i_size = yaffs_get_obj_length(obj);
+ inode->i_blocks = (inode->i_size + 511) >> 9;
+ inode->i_nlink = yaffs_get_obj_link_count(obj);
+ yaffs_trace(YAFFS_TRACE_OS,
+ "yaffs_fill_inode mode %x uid %d gid %d size %d count %d",
+ inode->i_mode, inode->i_uid, inode->i_gid,
+ (int)inode->i_size, atomic_read(&inode->i_count));
+
+ switch (obj->yst_mode & S_IFMT) {
+ default: /* fifo, device or socket */
+ init_special_inode(inode, obj->yst_mode,
+ old_decode_dev(obj->yst_rdev));
+ break;
+ case S_IFREG: /* file */
+ inode->i_op = &yaffs_file_inode_operations;
+ inode->i_fop = &yaffs_file_operations;
+ inode->i_mapping->a_ops = &yaffs_file_address_operations;
+ break;
+ case S_IFDIR: /* directory */
+ inode->i_op = &yaffs_dir_inode_operations;
+ inode->i_fop = &yaffs_dir_operations;
+ break;
+ case S_IFLNK: /* symlink */
+ inode->i_op = &yaffs_symlink_inode_operations;
+ break;
}
+
+ yaffs_inode_to_obj_lv(inode) = obj;
+ obj->my_inode = inode;
}
static void yaffs_put_super(struct super_block *sb)
@@ -2018,11 +1968,8 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
char *data_str = (char *)data;
struct yaffs_linux_context *context = NULL;
struct yaffs_param *param;
-
int read_only = 0;
-
struct yaffs_options options;
-
unsigned mount_id;
int found;
struct yaffs_linux_context *context_iterator;
@@ -2031,7 +1978,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
if (!sb) {
printk(KERN_INFO "yaffs: sb is NULL\n");
return NULL;
- }
+ }
sb->s_magic = YAFFS_MAGIC;
sb->s_op = &yaffs_super_ops;
@@ -2057,10 +2004,9 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
memset(&options, 0, sizeof(options));
- if (yaffs_parse_options(&options, data_str)) {
+ if (yaffs_parse_options(&options, data_str))
/* Option parsing failed */
return NULL;
- }
sb->s_blocksize = PAGE_CACHE_SIZE;
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
@@ -2102,25 +2048,21 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
yaffs_trace(YAFFS_TRACE_OS, " writeoob %p", mtd->write_oob);
yaffs_trace(YAFFS_TRACE_OS, " block_isbad %p", mtd->block_isbad);
yaffs_trace(YAFFS_TRACE_OS, " block_markbad %p", mtd->block_markbad);
- yaffs_trace(YAFFS_TRACE_OS, " %s %d", WRITE_SIZE_STR, WRITE_SIZE(mtd));
+ yaffs_trace(YAFFS_TRACE_OS, " writesize %d", mtd->writesize);
yaffs_trace(YAFFS_TRACE_OS, " oobsize %d", mtd->oobsize);
yaffs_trace(YAFFS_TRACE_OS, " erasesize %d", mtd->erasesize);
yaffs_trace(YAFFS_TRACE_OS, " size %lld", mtd->size);
-#ifdef CONFIG_YAFFS_AUTO_YAFFS2
-
- if (yaffs_version == 1 && WRITE_SIZE(mtd) >= 2048) {
+ if (yaffs_auto_select && yaffs_version == 1 && mtd->writesize >= 2048) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs2");
yaffs_version = 2;
}
- /* Added NCB 26/5/2006 for completeness */
- if (yaffs_version == 2 && !options.inband_tags
- && WRITE_SIZE(mtd) == 512) {
+ if (yaffs_auto_select && yaffs_version == 2 && !options.inband_tags &&
+ mtd->writesize == 512) {
yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs1");
yaffs_version = 1;
}
-#endif
if (yaffs_version == 2) {
/* Check for version 2 style functions */
@@ -2134,7 +2076,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
return NULL;
}
- if ((WRITE_SIZE(mtd) < YAFFS_MIN_YAFFS2_CHUNK_SIZE ||
+ if ((mtd->writesize < YAFFS_MIN_YAFFS2_CHUNK_SIZE ||
mtd->oobsize < YAFFS_MIN_YAFFS2_SPARE_SIZE) &&
!options.inband_tags) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
@@ -2151,7 +2093,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
return NULL;
}
- if (WRITE_SIZE(mtd) < YAFFS_BYTES_PER_CHUNK ||
+ if (mtd->writesize < YAFFS_BYTES_PER_CHUNK ||
mtd->oobsize != YAFFS_BYTES_PER_SPARE) {
yaffs_trace(YAFFS_TRACE_ALWAYS,
"MTD device does not support have the right page sizes");
@@ -2175,10 +2117,8 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
context = kmalloc(sizeof(struct yaffs_linux_context), GFP_KERNEL);
if (!dev || !context) {
- if (dev)
- kfree(dev);
- if (context)
- kfree(context);
+ kfree(dev);
+ kfree(context);
dev = NULL;
context = NULL;
}
@@ -2219,40 +2159,19 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
param->n_caches = (options.no_cache) ? 0 : 10;
param->inband_tags = options.inband_tags;
-#ifdef CONFIG_YAFFS_DISABLE_LAZY_LOAD
param->disable_lazy_load = 1;
-#endif
-#ifdef CONFIG_YAFFS_XATTR
param->enable_xattr = 1;
-#endif
if (options.lazy_loading_overridden)
param->disable_lazy_load = !options.lazy_loading_enabled;
-#ifdef CONFIG_YAFFS_DISABLE_TAGS_ECC
- param->no_tags_ecc = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_BACKGROUND
-#else
param->defered_dir_update = 1;
-#endif
if (options.tags_ecc_overridden)
param->no_tags_ecc = !options.tags_ecc_on;
-#ifdef CONFIG_YAFFS_EMPTY_LOST_AND_FOUND
param->empty_lost_n_found = 1;
-#endif
-#ifdef CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING
- param->refresh_period = 0;
-#else
param->refresh_period = 500;
-#endif
-
-#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
- param->always_check_erased = 1;
-#endif
if (options.empty_lost_and_found_overridden)
param->empty_lost_n_found = options.empty_lost_and_found;
@@ -2263,8 +2182,8 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
param->read_chunk_tags_fn = nandmtd2_read_chunk_tags;
param->bad_block_fn = nandmtd2_mark_block_bad;
param->query_block_fn = nandmtd2_query_block;
- yaffs_dev_to_lc(dev)->spare_buffer =
- kmalloc(mtd->oobsize, GFP_NOFS);
+ yaffs_dev_to_lc(dev)->spare_buffer =
+ kmalloc(mtd->oobsize, GFP_NOFS);
param->is_yaffs2 = 1;
param->total_bytes_per_chunk = mtd->writesize;
param->chunks_per_block = mtd->erasesize / mtd->writesize;
@@ -2291,22 +2210,19 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
yaffs_dev_to_lc(dev)->super = sb;
-#ifndef CONFIG_YAFFS_DOES_ECC
param->use_nand_ecc = 1;
-#endif
param->skip_checkpt_rd = options.skip_checkpoint_read;
param->skip_checkpt_wr = options.skip_checkpoint_write;
mutex_lock(&yaffs_context_lock);
/* Get a mount id */
- found = 0;
- for (mount_id = 0; !found; mount_id++) {
+ for (mount_id = 0, found = 0; !found; mount_id++) {
found = 1;
list_for_each(l, &yaffs_context_list) {
context_iterator =
- list_entry(l, struct yaffs_linux_context,
- context_list);
+ list_entry(l, struct yaffs_linux_context,
+ context_list);
if (context_iterator->mount_id == mount_id)
found = 0;
}
@@ -2393,8 +2309,6 @@ static struct file_system_type yaffs_fs_type = {
.fs_flags = FS_REQUIRES_DEV,
};
-#ifdef CONFIG_YAFFS_YAFFS2
-
static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
int silent)
{
@@ -2416,13 +2330,14 @@ static struct file_system_type yaffs2_fs_type = {
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
-#endif /* CONFIG_YAFFS_YAFFS2 */
+
static struct proc_dir_entry *my_proc_entry;
static char *yaffs_dump_dev_part0(char *buf, struct yaffs_dev *dev)
{
struct yaffs_param *param = &dev->param;
+
buf += sprintf(buf, "start_block........... %d\n", param->start_block);
buf += sprintf(buf, "end_block............. %d\n", param->end_block);
buf += sprintf(buf, "total_bytes_per_chunk. %d\n",
@@ -2476,7 +2391,7 @@ static char *yaffs_dump_dev_part1(char *buf, struct yaffs_dev *dev)
buf += sprintf(buf, "n_gc_blocks........... %u\n", dev->n_gc_blocks);
buf += sprintf(buf, "bg_gcs................ %u\n", dev->bg_gcs);
buf +=
- sprintf(buf, "n_retired_writes...... %u\n", dev->n_retired_writes);
+ sprintf(buf, "n_retried_writes...... %u\n", dev->n_retried_writes);
buf +=
sprintf(buf, "n_retired_blocks...... %u\n", dev->n_retired_blocks);
buf += sprintf(buf, "n_ecc_fixed........... %u\n", dev->n_ecc_fixed);
@@ -2524,7 +2439,8 @@ static int yaffs_proc_read(char *page,
mutex_lock(&yaffs_context_lock);
- /* Locate and print the Nth entry. Order N-squared but N is small. */
+ /* Locate and print the Nth entry.
+ * Order N-squared but N is small. */
list_for_each(item, &yaffs_context_list) {
struct yaffs_linux_context *dc =
list_entry(item, struct yaffs_linux_context,
@@ -2542,7 +2458,7 @@ static int yaffs_proc_read(char *page,
buf = yaffs_dump_dev_part0(buf, dev);
} else {
buf = yaffs_dump_dev_part1(buf, dev);
- }
+ }
break;
}
@@ -2553,149 +2469,6 @@ static int yaffs_proc_read(char *page,
}
-/**
- * Set the verbosity of the warnings and error messages.
- *
- * Note that the names can only be a..z or _ with the current code.
- */
-
-static struct {
- char *mask_name;
- unsigned mask_bitfield;
-} mask_flags[] = {
- {"allocate", YAFFS_TRACE_ALLOCATE},
- {"always", YAFFS_TRACE_ALWAYS},
- {"background", YAFFS_TRACE_BACKGROUND},
- {"bad_blocks", YAFFS_TRACE_BAD_BLOCKS},
- {"buffers", YAFFS_TRACE_BUFFERS},
- {"bug", YAFFS_TRACE_BUG},
- {"checkpt", YAFFS_TRACE_CHECKPOINT},
- {"deletion", YAFFS_TRACE_DELETION},
- {"erase", YAFFS_TRACE_ERASE},
- {"error", YAFFS_TRACE_ERROR},
- {"gc_detail", YAFFS_TRACE_GC_DETAIL},
- {"gc", YAFFS_TRACE_GC},
- {"lock", YAFFS_TRACE_LOCK},
- {"mtd", YAFFS_TRACE_MTD},
- {"nandaccess", YAFFS_TRACE_NANDACCESS},
- {"os", YAFFS_TRACE_OS},
- {"scan_debug", YAFFS_TRACE_SCAN_DEBUG},
- {"scan", YAFFS_TRACE_SCAN},
- {"mount", YAFFS_TRACE_MOUNT},
- {"tracing", YAFFS_TRACE_TRACING},
- {"sync", YAFFS_TRACE_SYNC},
- {"write", YAFFS_TRACE_WRITE},
- {"verify", YAFFS_TRACE_VERIFY},
- {"verify_nand", YAFFS_TRACE_VERIFY_NAND},
- {"verify_full", YAFFS_TRACE_VERIFY_FULL},
- {"verify_all", YAFFS_TRACE_VERIFY_ALL},
- {"all", 0xffffffff},
- {"none", 0},
- {NULL, 0},
-};
-
-#define MAX_MASK_NAME_LENGTH 40
-static int yaffs_proc_write_trace_options(struct file *file, const char *buf,
- unsigned long count, void *data)
-{
- unsigned rg = 0, mask_bitfield;
- char *end;
- char *mask_name;
- const char *x;
- char substring[MAX_MASK_NAME_LENGTH + 1];
- int i;
- int done = 0;
- int add, len = 0;
- int pos = 0;
-
- rg = yaffs_trace_mask;
-
- while (!done && (pos < count)) {
- done = 1;
- while ((pos < count) && isspace(buf[pos]))
- pos++;
-
- switch (buf[pos]) {
- case '+':
- case '-':
- case '=':
- add = buf[pos];
- pos++;
- break;
-
- default:
- add = ' ';
- break;
- }
- mask_name = NULL;
-
- mask_bitfield = simple_strtoul(buf + pos, &end, 0);
-
- if (end > buf + pos) {
- mask_name = "numeral";
- len = end - (buf + pos);
- pos += len;
- done = 0;
- } else {
- for (x = buf + pos, i = 0;
- (*x == '_' || (*x >= 'a' && *x <= 'z')) &&
- i < MAX_MASK_NAME_LENGTH; x++, i++, pos++)
- substring[i] = *x;
- substring[i] = '\0';
-
- for (i = 0; mask_flags[i].mask_name != NULL; i++) {
- if (strcmp(substring, mask_flags[i].mask_name)
- == 0) {
- mask_name = mask_flags[i].mask_name;
- mask_bitfield =
- mask_flags[i].mask_bitfield;
- done = 0;
- break;
- }
- }
- }
-
- if (mask_name != NULL) {
- done = 0;
- switch (add) {
- case '-':
- rg &= ~mask_bitfield;
- break;
- case '+':
- rg |= mask_bitfield;
- break;
- case '=':
- rg = mask_bitfield;
- break;
- default:
- rg |= mask_bitfield;
- break;
- }
- }
- }
-
- yaffs_trace_mask = rg | YAFFS_TRACE_ALWAYS;
-
- printk(KERN_DEBUG "new trace = 0x%08X\n", yaffs_trace_mask);
-
- if (rg & YAFFS_TRACE_ALWAYS) {
- for (i = 0; mask_flags[i].mask_name != NULL; i++) {
- char flag;
- flag = ((rg & mask_flags[i].mask_bitfield) ==
- mask_flags[i].mask_bitfield) ? '+' : '-';
- printk(KERN_DEBUG "%c%s\n", flag,
- mask_flags[i].mask_name);
- }
- }
-
- return count;
-}
-
-static int yaffs_proc_write(struct file *file, const char *buf,
- unsigned long count, void *data)
-{
- return yaffs_proc_write_trace_options(file, buf, count, data);
-}
/* Stuff to handle installation of file systems */
struct file_system_to_install {
@@ -2717,24 +2490,19 @@ static int __init init_yaffs_fs(void)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"yaffs built " __DATE__ " " __TIME__ " Installing.");
-#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
- yaffs_trace(YAFFS_TRACE_ALWAYS,
- "\n\nYAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.\n\n\n");
-#endif
-
mutex_init(&yaffs_context_lock);
/* Install the proc_fs entries */
my_proc_entry = create_proc_entry("yaffs",
- S_IRUGO | S_IFREG, YPROC_ROOT);
+ S_IRUGO | S_IFREG, NULL);
if (my_proc_entry) {
- my_proc_entry->write_proc = yaffs_proc_write;
+ my_proc_entry->write_proc = NULL;
my_proc_entry->read_proc = yaffs_proc_read;
my_proc_entry->data = NULL;
} else {
return -ENOMEM;
- }
+ }
/* Now add the file system entries */
@@ -2772,7 +2540,7 @@ static void __exit exit_yaffs_fs(void)
yaffs_trace(YAFFS_TRACE_ALWAYS,
"yaffs built " __DATE__ " " __TIME__ " removing.");
- remove_proc_entry("yaffs", YPROC_ROOT);
+ remove_proc_entry("yaffs", NULL);
fsinst = fs_to_install;
@@ -2786,8 +2554,8 @@ static void __exit exit_yaffs_fs(void)
}
module_init(init_yaffs_fs)
- module_exit(exit_yaffs_fs)
+module_exit(exit_yaffs_fs)
- MODULE_DESCRIPTION("YAFFS2 - a NAND specific flash file system");
-MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2010");
+MODULE_DESCRIPTION("YAFFS2 - a NAND specific flash file system");
+MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2011");
MODULE_LICENSE("GPL");
diff --git a/yaffs_yaffs1.c b/yaffs_yaffs1.c
index c879f57..da6a40f 100644
--- a/yaffs_yaffs1.c
+++ b/yaffs_yaffs1.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -24,29 +24,25 @@ int yaffs1_scan(struct yaffs_dev *dev)
struct yaffs_ext_tags tags;
int blk;
int result;
-
int chunk;
int c;
int deleted;
enum yaffs_block_state state;
- struct yaffs_obj *hard_list = NULL;
+ LIST_HEAD(hard_list);
struct yaffs_block_info *bi;
u32 seq_number;
struct yaffs_obj_hdr *oh;
struct yaffs_obj *in;
struct yaffs_obj *parent;
-
int alloc_failed = 0;
-
struct yaffs_shadow_fixer *shadow_fixers = NULL;
-
u8 *chunk_data;
yaffs_trace(YAFFS_TRACE_SCAN,
"yaffs1_scan starts intstartblk %d intendblk %d...",
dev->internal_start_block, dev->internal_end_block);
- chunk_data = yaffs_get_temp_buffer(dev, __LINE__);
+ chunk_data = yaffs_get_temp_buffer(dev);
dev->seq_number = YAFFS_LOWEST_SEQUENCE_NUMBER;
@@ -93,8 +89,9 @@ int yaffs1_scan(struct yaffs_dev *dev)
deleted = 0;
/* For each chunk in each block that needs scanning.... */
- for (c = 0; !alloc_failed && c < dev->param.chunks_per_block &&
- state == YAFFS_BLOCK_STATE_NEEDS_SCANNING; c++) {
+ for (c = 0;
+ !alloc_failed && c < dev->param.chunks_per_block &&
+ state == YAFFS_BLOCK_STATE_NEEDS_SCAN; c++) {
/* Read the tags and decide what to do */
chunk = blk * dev->param.chunks_per_block + c;
@@ -103,8 +100,8 @@ int yaffs1_scan(struct yaffs_dev *dev)
/* Let's have a good look at this chunk... */
- if (tags.ecc_result == YAFFS_ECC_RESULT_UNFIXED
- || tags.is_deleted) {
+ if (tags.ecc_result == YAFFS_ECC_RESULT_UNFIXED ||
+ tags.is_deleted) {
/* YAFFS1 only...
* A deleted chunk
*/
@@ -117,11 +114,12 @@ int yaffs1_scan(struct yaffs_dev *dev)
*/
if (c == 0) {
- /* We're looking at the first chunk in the block so the block is unused */
+ /* We're looking at the first chunk in
+ *the block so the block is unused */
state = YAFFS_BLOCK_STATE_EMPTY;
dev->n_erased_blocks++;
} else {
- /* this is the block being allocated from */
+ /* this is the block being allocated */
yaffs_trace(YAFFS_TRACE_SCAN,
" Allocating from %d %d",
blk, c);
@@ -129,7 +127,6 @@ int yaffs1_scan(struct yaffs_dev *dev)
dev->alloc_block = blk;
dev->alloc_page = c;
dev->alloc_block_finder = blk;
- /* Set block finder here to encourage the allocator to go forth from here. */
}
@@ -143,10 +140,10 @@ int yaffs1_scan(struct yaffs_dev *dev)
bi->pages_in_use++;
in = yaffs_find_or_create_by_number(dev,
- tags.obj_id,
- YAFFS_OBJECT_TYPE_FILE);
- /* PutChunkIntoFile checks for a clash (two data chunks with
- * the same chunk_id).
+ tags.obj_id,
+ YAFFS_OBJECT_TYPE_FILE);
+ /* PutChunkIntoFile checks for a clash
+ * (two data chunks with the same chunk_id).
*/
if (!in)
@@ -159,14 +156,14 @@ int yaffs1_scan(struct yaffs_dev *dev)
}
endpos =
- (tags.chunk_id -
- 1) * dev->data_bytes_per_chunk +
+ (tags.chunk_id - 1) *
+ dev->data_bytes_per_chunk +
tags.n_bytes;
- if (in
- && in->variant_type ==
- YAFFS_OBJECT_TYPE_FILE
- && in->variant.file_variant.scanned_size <
- endpos) {
+ if (in &&
+ in->variant_type ==
+ YAFFS_OBJECT_TYPE_FILE &&
+ in->variant.file_variant.scanned_size <
+ endpos) {
in->variant.file_variant.scanned_size =
endpos;
if (!dev->param.use_header_file_size) {
@@ -179,7 +176,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
}
} else {
/* chunk_id == 0, so it is an ObjectHeader.
- * Thus, we read in the object header and make the object
+ * Make the object
*/
yaffs_set_chunk_bit(dev, blk, c);
bi->pages_in_use++;
@@ -193,18 +190,19 @@ int yaffs1_scan(struct yaffs_dev *dev)
in = yaffs_find_by_number(dev, tags.obj_id);
if (in && in->variant_type != oh->type) {
/* This should not happen, but somehow
- * Wev'e ended up with an obj_id that has been reused but not yet
- * deleted, and worse still it has changed type. Delete the old object.
+ * Wev'e ended up with an obj_id that
+ * has been reused but not yet deleted,
+ * and worse still it has changed type.
+ * Delete the old object.
*/
yaffs_del_obj(in);
-
- in = 0;
+ in = NULL;
}
in = yaffs_find_or_create_by_number(dev,
- tags.obj_id,
- oh->type);
+ tags.obj_id,
+ oh->type);
if (!in)
alloc_failed = 1;
@@ -232,7 +230,9 @@ int yaffs1_scan(struct yaffs_dev *dev)
}
if (in && in->valid) {
- /* We have already filled this one. We have a duplicate and need to resolve it. */
+ /* We have already filled this one.
+ * We have a duplicate and need to
+ * resolve it. */
unsigned existing_serial = in->serial;
unsigned new_serial =
@@ -240,13 +240,15 @@ int yaffs1_scan(struct yaffs_dev *dev)
if (((existing_serial + 1) & 3) ==
new_serial) {
- /* Use new one - destroy the exisiting one */
+ /* Use new one - destroy the
+ * exisiting one */
yaffs_chunk_del(dev,
in->hdr_chunk,
1, __LINE__);
in->valid = 0;
} else {
- /* Use existing - destroy this one. */
+ /* Use existing - destroy
+ * this one. */
yaffs_chunk_del(dev, chunk, 1,
__LINE__);
}
@@ -256,7 +258,8 @@ int yaffs1_scan(struct yaffs_dev *dev)
(tags.obj_id == YAFFS_OBJECTID_ROOT ||
tags.obj_id ==
YAFFS_OBJECTID_LOSTNFOUND)) {
- /* We only load some info, don't fiddle with directory structure */
+ /* We only load some info, don't fiddle
+ * with directory structure */
in->valid = 1;
in->variant_type = oh->type;
@@ -295,12 +298,14 @@ int yaffs1_scan(struct yaffs_dev *dev)
parent->variant_type =
YAFFS_OBJECT_TYPE_DIRECTORY;
INIT_LIST_HEAD(&parent->
- variant.dir_variant.children);
- } else if (!parent
- || parent->variant_type !=
- YAFFS_OBJECT_TYPE_DIRECTORY) {
- /* Hoosterman, another problem....
- * We're trying to use a non-directory as a directory
+ variant.dir_variant.
+ children);
+ } else if (!parent ||
+ parent->variant_type !=
+ YAFFS_OBJECT_TYPE_DIRECTORY) {
+ /* Hoosterman, a problem....
+ * We're trying to use a
+ * non-directory as a directory
*/
yaffs_trace(YAFFS_TRACE_ERROR,
@@ -311,19 +316,6 @@ int yaffs1_scan(struct yaffs_dev *dev)
yaffs_add_obj_to_dir(parent, in);
- if (0 && (parent == dev->del_dir ||
- parent ==
- dev->unlinked_dir)) {
- in->deleted = 1; /* If it is unlinked at start up then it wants deleting */
- dev->n_deleted_files++;
- }
- /* Note re hardlinks.
- * Since we might scan a hardlink before its equivalent object is scanned
- * we put them all in a list.
- * After scanning is complete, we should have all the objects, so we run through this
- * list and fix up all the chains.
- */
-
switch (in->variant_type) {
case YAFFS_OBJECT_TYPE_UNKNOWN:
/* Todo got a problem */
@@ -333,7 +325,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
use_header_file_size)
in->variant.
- file_variant.file_size
+ file_variant.file_size
= oh->file_size;
break;
@@ -341,10 +333,8 @@ int yaffs1_scan(struct yaffs_dev *dev)
in->variant.
hardlink_variant.equiv_id =
oh->equiv_id;
- in->hard_links.next =
- (struct list_head *)
- hard_list;
- hard_list = in;
+ list_add(&in->hard_links,
+ &hard_list);
break;
case YAFFS_OBJECT_TYPE_DIRECTORY:
/* Do nothing */
@@ -361,18 +351,19 @@ int yaffs1_scan(struct yaffs_dev *dev)
alloc_failed = 1;
break;
}
-
}
}
}
- if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
- /* If we got this far while scanning, then the block is fully allocated. */
+ if (state == YAFFS_BLOCK_STATE_NEEDS_SCAN) {
+ /* If we got this far while scanning,
+ * then the block is fully allocated. */
state = YAFFS_BLOCK_STATE_FULL;
}
if (state == YAFFS_BLOCK_STATE_ALLOCATING) {
- /* If the block was partially allocated then treat it as fully allocated. */
+ /* If the block was partially allocated then
+ * treat it as fully allocated. */
state = YAFFS_BLOCK_STATE_FULL;
dev->alloc_block = -1;
}
@@ -382,21 +373,22 @@ int yaffs1_scan(struct yaffs_dev *dev)
/* Now let's see if it was dirty */
if (bi->pages_in_use == 0 &&
!bi->has_shrink_hdr &&
- bi->block_state == YAFFS_BLOCK_STATE_FULL) {
+ bi->block_state == YAFFS_BLOCK_STATE_FULL)
yaffs_block_became_dirty(dev, blk);
- }
-
}
/* Ok, we've done all the scanning.
* Fix up the hard link chains.
- * We should now have scanned all the objects, now it's time to add these
- * hardlinks.
+ * We should now have scanned all the objects, now it's time to add
+ * these hardlinks.
*/
- yaffs_link_fixup(dev, hard_list);
+ yaffs_link_fixup(dev, &hard_list);
- /* Fix up any shadowed objects */
+ /*
+ * Fix up any shadowed objects.
+ * There should not be more than one of these.
+ */
{
struct yaffs_shadow_fixer *fixer;
struct yaffs_obj *obj;
@@ -404,8 +396,9 @@ int yaffs1_scan(struct yaffs_dev *dev)
while (shadow_fixers) {
fixer = shadow_fixers;
shadow_fixers = fixer->next;
- /* Complete the rename transaction by deleting the shadowed object
- * then setting the object header to unshadowed.
+ /* Complete the rename transaction by deleting the
+ * shadowed object then setting the object header
+ to unshadowed.
*/
obj = yaffs_find_by_number(dev, fixer->shadowed_id);
if (obj)
@@ -420,7 +413,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
}
}
- yaffs_release_temp_buffer(dev, chunk_data, __LINE__);
+ yaffs_release_temp_buffer(dev, chunk_data);
if (alloc_failed)
return YAFFS_FAIL;
diff --git a/yaffs_yaffs1.h b/yaffs_yaffs1.h
index db23e04..97e2fdd 100644
--- a/yaffs_yaffs1.h
+++ b/yaffs_yaffs1.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_yaffs2.c b/yaffs_yaffs2.c
index 339f47f..5761e96 100644
--- a/yaffs_yaffs2.c
+++ b/yaffs_yaffs2.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. 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 Charles Manning <charles@aleph1.co.uk>
@@ -20,6 +20,7 @@
#include "yaffs_getblockinfo.h"
#include "yaffs_verify.h"
#include "yaffs_attribs.h"
+#include "yaffs_summary.h"
/*
* Checkpoints are really no benefit on very small partitions.
@@ -28,7 +29,6 @@
* the partition is at least this big.
*/
#define YAFFS_CHECKPOINT_MIN_BLOCKS 60
-
#define YAFFS_SMALL_HOLE_THRESHOLD 4
/*
@@ -55,7 +55,8 @@ void yaffs_calc_oldest_dirty_seq(struct yaffs_dev *dev)
for (i = dev->internal_start_block; i <= dev->internal_end_block; i++) {
if (b->block_state == YAFFS_BLOCK_STATE_FULL &&
(b->pages_in_use - b->soft_del_pages) <
- dev->param.chunks_per_block && b->seq_number < seq) {
+ dev->param.chunks_per_block &&
+ b->seq_number < seq) {
seq = b->seq_number;
block_no = i;
}
@@ -66,7 +67,6 @@ void yaffs_calc_oldest_dirty_seq(struct yaffs_dev *dev)
dev->oldest_dirty_seq = seq;
dev->oldest_dirty_block = block_no;
}
-
}
void yaffs2_find_oldest_dirty_seq(struct yaffs_dev *dev)
@@ -81,7 +81,7 @@ void yaffs2_find_oldest_dirty_seq(struct yaffs_dev *dev)
/*
* yaffs_clear_oldest_dirty_seq()
* Called when a block is erased or marked bad. (ie. when its seq_number
- * becomes invalid). If the value matches the oldest then we clear
+ * becomes invalid). If the value matches the oldest then we clear
* dev->oldest_dirty_seq to force its recomputation.
*/
void yaffs2_clear_oldest_dirty_seq(struct yaffs_dev *dev,
@@ -127,8 +127,8 @@ int yaffs_block_ok_for_gc(struct yaffs_dev *dev, struct yaffs_block_info *bi)
yaffs2_find_oldest_dirty_seq(dev);
- /* Can't do gc of this block if there are any blocks older than this one that have
- * discarded pages.
+ /* Can't do gc of this block if there are any blocks older than this
+ * one that have discarded pages.
*/
return (bi->seq_number <= dev->oldest_dirty_seq);
}
@@ -138,13 +138,11 @@ int yaffs_block_ok_for_gc(struct yaffs_dev *dev, struct yaffs_block_info *bi)
* periodically finds the oldest full block by sequence number for refreshing.
* Only for yaffs2.
*/
-u32 yaffs2_find_refresh_block(struct yaffs_dev * dev)
+u32 yaffs2_find_refresh_block(struct yaffs_dev *dev)
{
u32 b;
-
u32 oldest = 0;
u32 oldest_seq = 0;
-
struct yaffs_block_info *bi;
if (!dev->param.is_yaffs2)
@@ -210,29 +208,29 @@ int yaffs2_checkpt_required(struct yaffs_dev *dev)
int yaffs_calc_checkpt_blocks_required(struct yaffs_dev *dev)
{
int retval;
+ int n_bytes = 0;
+ int n_blocks;
+ int dev_blocks;
if (!dev->param.is_yaffs2)
return 0;
if (!dev->checkpoint_blocks_required && yaffs2_checkpt_required(dev)) {
/* Not a valid value so recalculate */
- int n_bytes = 0;
- int n_blocks;
- int dev_blocks =
- (dev->param.end_block - dev->param.start_block + 1);
-
+ dev_blocks = dev->param.end_block - dev->param.start_block + 1;
n_bytes += sizeof(struct yaffs_checkpt_validity);
n_bytes += sizeof(struct yaffs_checkpt_dev);
n_bytes += dev_blocks * sizeof(struct yaffs_block_info);
n_bytes += dev_blocks * dev->chunk_bit_stride;
n_bytes +=
- (sizeof(struct yaffs_checkpt_obj) +
- sizeof(u32)) * (dev->n_obj);
- n_bytes += (dev->tnode_size + sizeof(u32)) * (dev->n_tnodes);
+ (sizeof(struct yaffs_checkpt_obj) + sizeof(u32)) *
+ dev->n_obj;
+ n_bytes += (dev->tnode_size + sizeof(u32)) * dev->n_tnodes;
n_bytes += sizeof(struct yaffs_checkpt_validity);
n_bytes += sizeof(u32); /* checksum */
- /* Round up and add 2 blocks to allow for some bad blocks, so add 3 */
+ /* Round up and add 2 blocks to allow for some bad blocks,
+ * so add 3 */
n_blocks =
(n_bytes /
@@ -312,9 +310,7 @@ static int yaffs2_wr_checkpt_dev(struct yaffs_dev *dev)
{
struct yaffs_checkpt_dev cp;
u32 n_bytes;
- u32 n_blocks =
- (dev->internal_end_block - dev->internal_start_block + 1);
-
+ u32 n_blocks = dev->internal_end_block - dev->internal_start_block + 1;
int ok;
/* Write device runtime values */
@@ -322,22 +318,20 @@ static int yaffs2_wr_checkpt_dev(struct yaffs_dev *dev)
cp.struct_type = sizeof(cp);
ok = (yaffs2_checkpt_wr(dev, &cp, sizeof(cp)) == sizeof(cp));
+ if (!ok)
+ return 0;
/* Write block info */
- if (ok) {
- n_bytes = n_blocks * sizeof(struct yaffs_block_info);
- ok = (yaffs2_checkpt_wr(dev, dev->block_info, n_bytes) ==
- n_bytes);
- }
+ n_bytes = n_blocks * sizeof(struct yaffs_block_info);
+ ok = (yaffs2_checkpt_wr(dev, dev->block_info, n_bytes) == n_bytes);
+ if (!ok)
+ return 0;
/* Write chunk bits */
- if (ok) {
- n_bytes = n_blocks * dev->chunk_bit_stride;
- ok = (yaffs2_checkpt_wr(dev, dev->chunk_bits, n_bytes) ==
- n_bytes);
- }
- return ok ? 1 : 0;
+ n_bytes = n_blocks * dev->chunk_bit_stride;
+ ok = (yaffs2_checkpt_wr(dev, dev->chunk_bits, n_bytes) == n_bytes);
+ return ok ? 1 : 0;
}
static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
@@ -346,7 +340,6 @@ static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
u32 n_bytes;
u32 n_blocks =
(dev->internal_end_block - dev->internal_start_block + 1);
-
int ok;
ok = (yaffs2_checkpt_rd(dev, &cp, sizeof(cp)) == sizeof(cp));
@@ -364,6 +357,7 @@ static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
if (!ok)
return 0;
+
n_bytes = n_blocks * dev->chunk_bit_stride;
ok = (yaffs2_checkpt_rd(dev, dev->chunk_bits, n_bytes) == n_bytes);
@@ -374,7 +368,6 @@ static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
static void yaffs2_obj_checkpt_obj(struct yaffs_checkpt_obj *cp,
struct yaffs_obj *obj)
{
-
cp->obj_id = obj->obj_id;
cp->parent_id = (obj->parent) ? obj->parent->obj_id : 0;
cp->hdr_chunk = obj->hdr_chunk;
@@ -394,10 +387,9 @@ static void yaffs2_obj_checkpt_obj(struct yaffs_checkpt_obj *cp,
cp->size_or_equiv_obj = obj->variant.hardlink_variant.equiv_id;
}
-static int taffs2_checkpt_obj_to_obj(struct yaffs_obj *obj,
+static int yaffs2_checkpt_obj_to_obj(struct yaffs_obj *obj,
struct yaffs_checkpt_obj *cp)
{
-
struct yaffs_obj *parent;
if (obj->variant_type != cp->variant_type) {
@@ -412,8 +404,8 @@ static int taffs2_checkpt_obj_to_obj(struct yaffs_obj *obj,
if (cp->parent_id)
parent = yaffs_find_or_create_by_number(obj->my_dev,
- cp->parent_id,
- YAFFS_OBJECT_TYPE_DIRECTORY);
+ cp->parent_id,
+ YAFFS_OBJECT_TYPE_DIRECTORY);
else
parent = NULL;
@@ -457,39 +449,33 @@ static int yaffs2_checkpt_tnode_worker(struct yaffs_obj *in,
int i;
struct yaffs_dev *dev = in->my_dev;
int ok = 1;
-
- if (tn) {
- if (level > 0) {
-
- for (i = 0; i < YAFFS_NTNODES_INTERNAL && ok; i++) {
- if (tn->internal[i]) {
- ok = yaffs2_checkpt_tnode_worker(in,
- tn->
- internal
- [i],
- level -
- 1,
- (chunk_offset
- <<
- YAFFS_TNODES_INTERNAL_BITS)
- + i);
- }
- }
- } else if (level == 0) {
- u32 base_offset =
- chunk_offset << YAFFS_TNODES_LEVEL0_BITS;
- ok = (yaffs2_checkpt_wr
- (dev, &base_offset,
- sizeof(base_offset)) == sizeof(base_offset));
- if (ok)
- ok = (yaffs2_checkpt_wr
- (dev, tn,
- dev->tnode_size) == dev->tnode_size);
+ u32 base_offset;
+
+ if (!tn)
+ return 1;
+
+ if (level > 0) {
+ for (i = 0; i < YAFFS_NTNODES_INTERNAL && ok; i++) {
+ if (!tn->internal[i])
+ continue;
+ ok = yaffs2_checkpt_tnode_worker(in,
+ tn->internal[i],
+ level - 1,
+ (chunk_offset <<
+ YAFFS_TNODES_INTERNAL_BITS) + i);
}
+ return ok;
}
- return ok;
+ /* Level 0 tnode */
+ base_offset = chunk_offset << YAFFS_TNODES_LEVEL0_BITS;
+ ok = (yaffs2_checkpt_wr(dev, &base_offset, sizeof(base_offset)) ==
+ sizeof(base_offset));
+ if (ok)
+ ok = (yaffs2_checkpt_wr(dev, tn, dev->tnode_size) ==
+ dev->tnode_size);
+ return ok;
}
static int yaffs2_wr_checkpt_tnodes(struct yaffs_obj *obj)
@@ -497,16 +483,16 @@ static int yaffs2_wr_checkpt_tnodes(struct yaffs_obj *obj)
u32 end_marker = ~0;
int ok = 1;
- if (obj->variant_type == YAFFS_OBJECT_TYPE_FILE) {
- ok = yaffs2_checkpt_tnode_worker(obj,
- obj->variant.file_variant.top,
- obj->variant.file_variant.
- top_level, 0);
- if (ok)
- ok = (yaffs2_checkpt_wr
- (obj->my_dev, &end_marker,
- sizeof(end_marker)) == sizeof(end_marker));
- }
+ if (obj->variant_type != YAFFS_OBJECT_TYPE_FILE)
+ return ok;
+
+ ok = yaffs2_checkpt_tnode_worker(obj,
+ obj->variant.file_variant.top,
+ obj->variant.file_variant.
+ top_level, 0);
+ if (ok)
+ ok = (yaffs2_checkpt_wr(obj->my_dev, &end_marker,
+ sizeof(end_marker)) == sizeof(end_marker));
return ok ? 1 : 0;
}
@@ -528,12 +514,11 @@ static int yaffs2_rd_checkpt_tnodes(struct yaffs_obj *obj)
/* Read level 0 tnode */
tn = yaffs_get_tnode(dev);
- if (tn) {
+ if (tn)
ok = (yaffs2_checkpt_rd(dev, tn, dev->tnode_size) ==
- dev->tnode_size);
- } else {
+ dev->tnode_size);
+ else
ok = 0;
- }
if (tn && ok)
ok = yaffs_add_find_tnode_0(dev,
@@ -544,7 +529,6 @@ static int yaffs2_rd_checkpt_tnodes(struct yaffs_obj *obj)
ok = (yaffs2_checkpt_rd
(dev, &base_chunk,
sizeof(base_chunk)) == sizeof(base_chunk));
-
}
yaffs_trace(YAFFS_TRACE_CHECKPOINT,
@@ -569,7 +553,7 @@ static int yaffs2_wr_checkpt_objs(struct yaffs_dev *dev)
for (i = 0; ok && i < YAFFS_NOBJECT_BUCKETS; i++) {
list_for_each(lh, &dev->obj_bucket[i].list) {
obj = list_entry(lh, struct yaffs_obj, hash_link);
- if (!obj->defered_free) {
+ if (!obj->defered_free) {
yaffs2_obj_checkpt_obj(&cp, obj);
cp.struct_type = sizeof(cp);
@@ -579,18 +563,18 @@ static int yaffs2_wr_checkpt_objs(struct yaffs_dev *dev)
cp.variant_type, cp.hdr_chunk, obj);
ok = (yaffs2_checkpt_wr(dev, &cp,
- sizeof(cp)) == sizeof(cp));
+ sizeof(cp)) == sizeof(cp));
if (ok &&
- obj->variant_type ==
- YAFFS_OBJECT_TYPE_FILE)
- ok = yaffs2_wr_checkpt_tnodes(obj);
+ obj->variant_type ==
+ YAFFS_OBJECT_TYPE_FILE)
+ ok = yaffs2_wr_checkpt_tnodes(obj);
}
}
}
/* Dump end of list */
- memset(&cp, 0xFF, sizeof(struct yaffs_checkpt_obj));
+ memset(&cp, 0xff, sizeof(struct yaffs_checkpt_obj));
cp.struct_type = sizeof(cp);
if (ok)
@@ -605,7 +589,8 @@ static int yaffs2_rd_checkpt_objs(struct yaffs_dev *dev)
struct yaffs_checkpt_obj cp;
int ok = 1;
int done = 0;
- struct yaffs_obj *hard_list = NULL;
+ LIST_HEAD(hard_list);
+
while (ok && !done) {
ok = (yaffs2_checkpt_rd(dev, &cp, sizeof(cp)) == sizeof(cp));
@@ -628,25 +613,24 @@ static int yaffs2_rd_checkpt_objs(struct yaffs_dev *dev)
yaffs_find_or_create_by_number(dev, cp.obj_id,
cp.variant_type);
if (obj) {
- ok = taffs2_checkpt_obj_to_obj(obj, &cp);
+ ok = yaffs2_checkpt_obj_to_obj(obj, &cp);
if (!ok)
break;
- if (obj->variant_type == YAFFS_OBJECT_TYPE_FILE) {
+ if (obj->variant_type ==
+ YAFFS_OBJECT_TYPE_FILE) {
ok = yaffs2_rd_checkpt_tnodes(obj);
} else if (obj->variant_type ==
- YAFFS_OBJECT_TYPE_HARDLINK) {
- obj->hard_links.next =
- (struct list_head *)hard_list;
- hard_list = obj;
+ YAFFS_OBJECT_TYPE_HARDLINK) {
+ list_add(&obj->hard_links, &hard_list);
}
} else {
ok = 0;
- }
+ }
}
}
if (ok)
- yaffs_link_fixup(dev, hard_list);
+ yaffs_link_fixup(dev, &hard_list);
return ok ? 1 : 0;
}
@@ -659,7 +643,7 @@ static int yaffs2_wr_checkpt_sum(struct yaffs_dev *dev)
yaffs2_get_checkpt_sum(dev, &checkpt_sum);
ok = (yaffs2_checkpt_wr(dev, &checkpt_sum, sizeof(checkpt_sum)) ==
- sizeof(checkpt_sum));
+ sizeof(checkpt_sum));
if (!ok)
return 0;
@@ -676,7 +660,7 @@ static int yaffs2_rd_checkpt_sum(struct yaffs_dev *dev)
yaffs2_get_checkpt_sum(dev, &checkpt_sum0);
ok = (yaffs2_checkpt_rd(dev, &checkpt_sum1, sizeof(checkpt_sum1)) ==
- sizeof(checkpt_sum1));
+ sizeof(checkpt_sum1));
if (!ok)
return 0;
@@ -787,7 +771,6 @@ static int yaffs2_rd_checkpt_data(struct yaffs_dev *dev)
dev->is_checkpointed = 0;
return ok ? 1 : 0;
-
}
void yaffs2_checkpt_invalidate(struct yaffs_dev *dev)
@@ -802,7 +785,6 @@ void yaffs2_checkpt_invalidate(struct yaffs_dev *dev)
int yaffs_checkpoint_save(struct yaffs_dev *dev)
{
-
yaffs_trace(YAFFS_TRACE_CHECKPOINT,
"save entry: is_checkpointed %d",
dev->is_checkpointed);
@@ -826,6 +808,7 @@ int yaffs_checkpoint_save(struct yaffs_dev *dev)
int yaffs2_checkpt_restore(struct yaffs_dev *dev)
{
int retval;
+
yaffs_trace(YAFFS_TRACE_CHECKPOINT,
"restore entry: is_checkpointed %d",
dev->is_checkpointed);
@@ -849,17 +832,15 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
{
/* if new_size > old_file_size.
* We're going to be writing a hole.
- * If the hole is small then write zeros otherwise write a start of hole marker.
+ * If the hole is small then write zeros otherwise write a start
+ * of hole marker.
*/
-
loff_t old_file_size;
int increase;
int small_hole;
int result = YAFFS_OK;
struct yaffs_dev *dev = NULL;
-
u8 *local_buffer = NULL;
-
int small_increase_ok = 0;
if (!obj)
@@ -888,7 +869,7 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
small_hole = 0;
if (small_hole)
- local_buffer = yaffs_get_temp_buffer(dev, __LINE__);
+ local_buffer = yaffs_get_temp_buffer(dev);
if (local_buffer) {
/* fill hole with zero bytes */
@@ -910,12 +891,12 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
increase -= this_write;
} else {
small_increase_ok = 0;
- }
+ }
}
- yaffs_release_temp_buffer(dev, local_buffer, __LINE__);
+ yaffs_release_temp_buffer(dev, local_buffer);
- /* If we were out of space then reverse any chunks we've added */
+ /* If out of space then reverse any chunks we've added */
if (!small_increase_ok)
yaffs_resize_file_down(obj, old_file_size);
}
@@ -929,7 +910,6 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
}
return result;
-
}
struct yaffs_block_index {
@@ -943,44 +923,443 @@ static int yaffs2_ybicmp(const void *a, const void *b)
int bseq = ((struct yaffs_block_index *)b)->seq;
int ablock = ((struct yaffs_block_index *)a)->block;
int bblock = ((struct yaffs_block_index *)b)->block;
+
if (aseq == bseq)
return ablock - bblock;
- else
- return aseq - bseq;
+
+ return aseq - bseq;
}
-int yaffs2_scan_backwards(struct yaffs_dev *dev)
+static inline int yaffs2_scan_chunk(struct yaffs_dev *dev,
+ struct yaffs_block_info *bi,
+ int blk, int chunk_in_block,
+ int *found_chunks,
+ u8 *chunk_data,
+ struct list_head *hard_list,
+ int summary_available)
{
+ struct yaffs_obj_hdr *oh;
+ struct yaffs_obj *in;
+ struct yaffs_obj *parent;
+ int equiv_id;
+ int file_size;
+ int is_shrink;
+ int is_unlinked;
struct yaffs_ext_tags tags;
+ int result;
+ int alloc_failed = 0;
+ int chunk = blk * dev->param.chunks_per_block + chunk_in_block;
+ struct yaffs_file_var *file_var;
+ struct yaffs_hardlink_var *hl_var;
+ struct yaffs_symlink_var *sl_var;
+
+ if (summary_available) {
+ result = yaffs_summary_fetch(dev, &tags, chunk_in_block);
+ tags.seq_number = bi->seq_number;
+ }
+
+ if (!summary_available || tags.obj_id == 0) {
+ result = yaffs_rd_chunk_tags_nand(dev, chunk, NULL, &tags);
+ dev->tags_used++;
+ } else {
+ dev->summary_used++;
+ }
+
+ /* Let's have a good look at this chunk... */
+
+ if (!tags.chunk_used) {
+ /* An unassigned chunk in the block.
+ * If there are used chunks after this one, then
+ * it is a chunk that was skipped due to failing
+ * the erased check. Just skip it so that it can
+ * be deleted.
+ * But, more typically, We get here when this is
+ * an unallocated chunk and his means that
+ * either the block is empty or this is the one
+ * being allocated from
+ */
+
+ if (*found_chunks) {
+ /* This is a chunk that was skipped due
+ * to failing the erased check */
+ } else if (chunk_in_block == 0) {
+ /* We're looking at the first chunk in
+ * the block so the block is unused */
+ bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
+ dev->n_erased_blocks++;
+ } else {
+ if (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN ||
+ bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING) {
+ if (dev->seq_number == bi->seq_number) {
+ /* Allocating from this block*/
+ yaffs_trace(YAFFS_TRACE_SCAN,
+ " Allocating from %d %d",
+ blk, chunk_in_block);
+
+ bi->block_state =
+ YAFFS_BLOCK_STATE_ALLOCATING;
+ dev->alloc_block = blk;
+ dev->alloc_page = chunk_in_block;
+ dev->alloc_block_finder = blk;
+ } else {
+ /* This is a partially written block
+ * that is not the current
+ * allocation block.
+ */
+ yaffs_trace(YAFFS_TRACE_SCAN,
+ "Partially written block %d detected. gc will fix this.",
+ blk);
+ }
+ }
+ }
+
+ dev->n_free_chunks++;
+
+ } else if (tags.ecc_result ==
+ YAFFS_ECC_RESULT_UNFIXED) {
+ yaffs_trace(YAFFS_TRACE_SCAN,
+ " Unfixed ECC in chunk(%d:%d), chunk ignored",
+ blk, chunk_in_block);
+ dev->n_free_chunks++;
+ } else if (tags.obj_id > YAFFS_MAX_OBJECT_ID ||
+ tags.chunk_id > YAFFS_MAX_CHUNK_ID ||
+ tags.obj_id == YAFFS_OBJECTID_SUMMARY ||
+ (tags.chunk_id > 0 &&
+ tags.n_bytes > dev->data_bytes_per_chunk) ||
+ tags.seq_number != bi->seq_number) {
+ yaffs_trace(YAFFS_TRACE_SCAN,
+ "Chunk (%d:%d) with bad tags:obj = %d, chunk_id = %d, n_bytes = %d, ignored",
+ blk, chunk_in_block, tags.obj_id,
+ tags.chunk_id, tags.n_bytes);
+ dev->n_free_chunks++;
+ } else if (tags.chunk_id > 0) {
+ /* chunk_id > 0 so it is a data chunk... */
+ unsigned int endpos;
+ u32 chunk_base = (tags.chunk_id - 1) *
+ dev->data_bytes_per_chunk;
+
+ *found_chunks = 1;
+
+ yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+ bi->pages_in_use++;
+
+ in = yaffs_find_or_create_by_number(dev,
+ tags.obj_id,
+ YAFFS_OBJECT_TYPE_FILE);
+ if (!in)
+ /* Out of memory */
+ alloc_failed = 1;
+
+ if (in &&
+ in->variant_type == YAFFS_OBJECT_TYPE_FILE &&
+ chunk_base < in->variant.file_variant.shrink_size) {
+ /* This has not been invalidated by
+ * a resize */
+ if (!yaffs_put_chunk_in_file(in, tags.chunk_id,
+ chunk, -1))
+ alloc_failed = 1;
+
+ /* File size is calculated by looking at
+ * the data chunks if we have not
+ * seen an object header yet.
+ * Stop this practice once we find an
+ * object header.
+ */
+ endpos = chunk_base + tags.n_bytes;
+
+ if (!in->valid &&
+ in->variant.file_variant.scanned_size < endpos) {
+ in->variant.file_variant.
+ scanned_size = endpos;
+ in->variant.file_variant.
+ file_size = endpos;
+ }
+ } else if (in) {
+ /* This chunk has been invalidated by a
+ * resize, or a past file deletion
+ * so delete the chunk*/
+ yaffs_chunk_del(dev, chunk, 1, __LINE__);
+ }
+ } else {
+ /* chunk_id == 0, so it is an ObjectHeader.
+ * Thus, we read in the object header and make
+ * the object
+ */
+ *found_chunks = 1;
+
+ yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+ bi->pages_in_use++;
+
+ oh = NULL;
+ in = NULL;
+
+ if (tags.extra_available) {
+ in = yaffs_find_or_create_by_number(dev,
+ tags.obj_id,
+ tags.extra_obj_type);
+ if (!in)
+ alloc_failed = 1;
+ }
+
+ if (!in ||
+ (!in->valid && dev->param.disable_lazy_load) ||
+ tags.extra_shadows ||
+ (!in->valid && (tags.obj_id == YAFFS_OBJECTID_ROOT ||
+ tags.obj_id == YAFFS_OBJECTID_LOSTNFOUND))) {
+
+ /* If we don't have valid info then we
+ * need to read the chunk
+ * TODO In future we can probably defer
+ * reading the chunk and living with
+ * invalid data until needed.
+ */
+
+ result = yaffs_rd_chunk_tags_nand(dev,
+ chunk,
+ chunk_data,
+ NULL);
+
+ oh = (struct yaffs_obj_hdr *)chunk_data;
+
+ if (dev->param.inband_tags) {
+ /* Fix up the header if they got
+ * corrupted by inband tags */
+ oh->shadows_obj =
+ oh->inband_shadowed_obj_id;
+ oh->is_shrink =
+ oh->inband_is_shrink;
+ }
+
+ if (!in) {
+ in = yaffs_find_or_create_by_number(dev,
+ tags.obj_id, oh->type);
+ if (!in)
+ alloc_failed = 1;
+ }
+ }
+
+ if (!in) {
+ /* TODO Hoosterman we have a problem! */
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "yaffs tragedy: Could not make object for object %d at chunk %d during scan",
+ tags.obj_id, chunk);
+ return YAFFS_FAIL;
+ }
+
+ if (in->valid) {
+ /* We have already filled this one.
+ * We have a duplicate that will be
+ * discarded, but we first have to suck
+ * out resize info if it is a file.
+ */
+ if ((in->variant_type == YAFFS_OBJECT_TYPE_FILE) &&
+ ((oh && oh->type == YAFFS_OBJECT_TYPE_FILE) ||
+ (tags.extra_available &&
+ tags.extra_obj_type == YAFFS_OBJECT_TYPE_FILE)
+ )) {
+ u32 this_size = (oh) ?
+ oh->file_size :
+ tags.extra_length;
+ u32 parent_obj_id = (oh) ?
+ oh->parent_obj_id :
+ tags.extra_parent_id;
+
+ is_shrink = (oh) ?
+ oh->is_shrink :
+ tags.extra_is_shrink;
+
+ /* If it is deleted (unlinked
+ * at start also means deleted)
+ * we treat the file size as
+ * being zeroed at this point.
+ */
+ if (parent_obj_id == YAFFS_OBJECTID_DELETED ||
+ parent_obj_id == YAFFS_OBJECTID_UNLINKED) {
+ this_size = 0;
+ is_shrink = 1;
+ }
+
+ if (is_shrink &&
+ in->variant.file_variant.shrink_size >
+ this_size)
+ in->variant.file_variant.shrink_size =
+ this_size;
+
+ if (is_shrink)
+ bi->has_shrink_hdr = 1;
+ }
+ /* Use existing - destroy this one. */
+ yaffs_chunk_del(dev, chunk, 1, __LINE__);
+ }
+
+ if (!in->valid && in->variant_type !=
+ (oh ? oh->type : tags.extra_obj_type))
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "yaffs tragedy: Bad object type, %d != %d, for object %d at chunk %d during scan",
+ oh ? oh->type : tags.extra_obj_type,
+ in->variant_type, tags.obj_id,
+ chunk);
+
+ if (!in->valid &&
+ (tags.obj_id == YAFFS_OBJECTID_ROOT ||
+ tags.obj_id == YAFFS_OBJECTID_LOSTNFOUND)) {
+ /* We only load some info, don't fiddle
+ * with directory structure */
+ in->valid = 1;
+
+ if (oh) {
+ in->yst_mode = oh->yst_mode;
+ yaffs_load_attribs(in, oh);
+ in->lazy_loaded = 0;
+ } else {
+ in->lazy_loaded = 1;
+ }
+ in->hdr_chunk = chunk;
+
+ } else if (!in->valid) {
+ /* we need to load this info */
+ in->valid = 1;
+ in->hdr_chunk = chunk;
+ if (oh) {
+ in->variant_type = oh->type;
+ in->yst_mode = oh->yst_mode;
+ yaffs_load_attribs(in, oh);
+
+ if (oh->shadows_obj > 0)
+ yaffs_handle_shadowed_obj(dev,
+ oh->shadows_obj, 1);
+
+ yaffs_set_obj_name_from_oh(in, oh);
+ parent = yaffs_find_or_create_by_number(dev,
+ oh->parent_obj_id,
+ YAFFS_OBJECT_TYPE_DIRECTORY);
+ file_size = oh->file_size;
+ is_shrink = oh->is_shrink;
+ equiv_id = oh->equiv_id;
+ } else {
+ in->variant_type = tags.extra_obj_type;
+ parent = yaffs_find_or_create_by_number(dev,
+ tags.extra_parent_id,
+ YAFFS_OBJECT_TYPE_DIRECTORY);
+ file_size = tags.extra_length;
+ is_shrink = tags.extra_is_shrink;
+ equiv_id = tags.extra_equiv_id;
+ in->lazy_loaded = 1;
+ }
+ in->dirty = 0;
+
+ if (!parent)
+ alloc_failed = 1;
+
+ /* directory stuff...
+ * hook up to parent
+ */
+
+ if (parent &&
+ parent->variant_type == YAFFS_OBJECT_TYPE_UNKNOWN) {
+ /* Set up as a directory */
+ parent->variant_type =
+ YAFFS_OBJECT_TYPE_DIRECTORY;
+ INIT_LIST_HEAD(&parent->
+ variant.dir_variant.children);
+ } else if (!parent ||
+ parent->variant_type !=
+ YAFFS_OBJECT_TYPE_DIRECTORY) {
+ /* Hoosterman, another problem....
+ * Trying to use a non-directory as a directory
+ */
+
+ yaffs_trace(YAFFS_TRACE_ERROR,
+ "yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found."
+ );
+ parent = dev->lost_n_found;
+ }
+ yaffs_add_obj_to_dir(parent, in);
+
+ is_unlinked = (parent == dev->del_dir) ||
+ (parent == dev->unlinked_dir);
+
+ if (is_shrink)
+ /* Mark the block */
+ bi->has_shrink_hdr = 1;
+
+ /* Note re hardlinks.
+ * Since we might scan a hardlink before its equivalent
+ * object is scanned we put them all in a list.
+ * After scanning is complete, we should have all the
+ * objects, so we run through this list and fix up all
+ * the chains.
+ */
+
+ switch (in->variant_type) {
+ case YAFFS_OBJECT_TYPE_UNKNOWN:
+ /* Todo got a problem */
+ break;
+ case YAFFS_OBJECT_TYPE_FILE:
+ file_var = &in->variant.file_variant;
+ if (file_var->scanned_size < file_size) {
+ /* This covers the case where the file
+ * size is greater than the data held.
+ * This will happen if the file is
+ * resized to be larger than its
+ * current data extents.
+ */
+ file_var->file_size = file_size;
+ file_var->scanned_size = file_size;
+ }
+
+ if (file_var->shrink_size > file_size)
+ file_var->shrink_size = file_size;
+
+ break;
+ case YAFFS_OBJECT_TYPE_HARDLINK:
+ hl_var = &in->variant.hardlink_variant;
+ if (!is_unlinked) {
+ hl_var->equiv_id = equiv_id;
+ list_add(&in->hard_links, hard_list);
+ }
+ break;
+ case YAFFS_OBJECT_TYPE_DIRECTORY:
+ /* Do nothing */
+ break;
+ case YAFFS_OBJECT_TYPE_SPECIAL:
+ /* Do nothing */
+ break;
+ case YAFFS_OBJECT_TYPE_SYMLINK:
+ sl_var = &in->variant.symlink_variant;
+ if (oh) {
+ sl_var->alias =
+ yaffs_clone_str(oh->alias);
+ if (!sl_var->alias)
+ alloc_failed = 1;
+ }
+ break;
+ }
+ }
+ }
+ return alloc_failed ? YAFFS_FAIL : YAFFS_OK;
+}
+
+int yaffs2_scan_backwards(struct yaffs_dev *dev)
+{
int blk;
int block_iter;
int start_iter;
int end_iter;
int n_to_scan = 0;
-
- int chunk;
- int result;
+ enum yaffs_block_state state;
int c;
int deleted;
- enum yaffs_block_state state;
- struct yaffs_obj *hard_list = NULL;
+ LIST_HEAD(hard_list);
struct yaffs_block_info *bi;
u32 seq_number;
- struct yaffs_obj_hdr *oh;
- struct yaffs_obj *in;
- struct yaffs_obj *parent;
int n_blocks = dev->internal_end_block - dev->internal_start_block + 1;
- int is_unlinked;
u8 *chunk_data;
-
- int file_size;
- int is_shrink;
int found_chunks;
- int equiv_id;
int alloc_failed = 0;
-
struct yaffs_block_index *block_index = NULL;
int alt_block_index = 0;
+ int summary_available;
yaffs_trace(YAFFS_TRACE_SCAN,
"yaffs2_scan_backwards starts intstartblk %d intendblk %d...",
@@ -988,8 +1367,8 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
dev->seq_number = YAFFS_LOWEST_SEQUENCE_NUMBER;
- block_index = kmalloc(n_blocks * sizeof(struct yaffs_block_index),
- GFP_NOFS);
+ block_index =
+ kmalloc(n_blocks * sizeof(struct yaffs_block_index), GFP_NOFS);
if (!block_index) {
block_index =
@@ -1006,7 +1385,7 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
dev->blocks_in_checkpt = 0;
- chunk_data = yaffs_get_temp_buffer(dev, __LINE__);
+ chunk_data = yaffs_get_temp_buffer(dev);
/* Scan all the blocks to determine their state */
bi = dev->block_info;
@@ -1022,35 +1401,32 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
bi->seq_number = seq_number;
if (bi->seq_number == YAFFS_SEQUENCE_CHECKPOINT_DATA)
- bi->block_state = state = YAFFS_BLOCK_STATE_CHECKPOINT;
+ bi->block_state = YAFFS_BLOCK_STATE_CHECKPOINT;
if (bi->seq_number == YAFFS_SEQUENCE_BAD_BLOCK)
- bi->block_state = state = YAFFS_BLOCK_STATE_DEAD;
+ bi->block_state = YAFFS_BLOCK_STATE_DEAD;
yaffs_trace(YAFFS_TRACE_SCAN_DEBUG,
"Block scanning block %d state %d seq %d",
- blk, state, seq_number);
+ blk, bi->block_state, seq_number);
- if (state == YAFFS_BLOCK_STATE_CHECKPOINT) {
+ if (bi->block_state == YAFFS_BLOCK_STATE_CHECKPOINT) {
dev->blocks_in_checkpt++;
- } else if (state == YAFFS_BLOCK_STATE_DEAD) {
+ } else if (bi->block_state == YAFFS_BLOCK_STATE_DEAD) {
yaffs_trace(YAFFS_TRACE_BAD_BLOCKS,
"block %d is bad", blk);
- } else if (state == YAFFS_BLOCK_STATE_EMPTY) {
+ } else if (bi->block_state == YAFFS_BLOCK_STATE_EMPTY) {
yaffs_trace(YAFFS_TRACE_SCAN_DEBUG, "Block empty ");
dev->n_erased_blocks++;
dev->n_free_chunks += dev->param.chunks_per_block;
- } else if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
-
+ } else if (bi->block_state ==
+ YAFFS_BLOCK_STATE_NEEDS_SCAN) {
/* Determine the highest sequence number */
if (seq_number >= YAFFS_LOWEST_SEQUENCE_NUMBER &&
seq_number < YAFFS_HIGHEST_SEQUENCE_NUMBER) {
-
block_index[n_to_scan].seq = seq_number;
block_index[n_to_scan].block = blk;
-
n_to_scan++;
-
if (seq_number >= dev->seq_number)
dev->seq_number = seq_number;
} else {
@@ -1058,7 +1434,6 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
yaffs_trace(YAFFS_TRACE_SCAN,
"Block scanning block %d has bad sequence number %d",
blk, seq_number);
-
}
}
bi++;
@@ -1082,7 +1457,8 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
yaffs_trace(YAFFS_TRACE_SCAN_DEBUG, "%d blocks to scan", n_to_scan);
/* For each block.... backwards */
- for (block_iter = end_iter; !alloc_failed && block_iter >= start_iter;
+ for (block_iter = end_iter;
+ !alloc_failed && block_iter >= start_iter;
block_iter--) {
/* Cooperative multitasking! This loop can run for so
long that watchdog timers expire. */
@@ -1090,474 +1466,38 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
/* get the block to scan in the correct order */
blk = block_index[block_iter].block;
-
bi = yaffs_get_block_info(dev, blk);
-
- state = bi->block_state;
-
deleted = 0;
+ summary_available = yaffs_summary_read(dev, dev->sum_tags, blk);
+
/* For each chunk in each block that needs scanning.... */
found_chunks = 0;
- for (c = dev->param.chunks_per_block - 1;
+ if(summary_available)
+ c = dev->chunks_per_summary - 1;
+ else
+ c = dev->param.chunks_per_block - 1;
+
+ for (/* c is already initialised */;
!alloc_failed && c >= 0 &&
- (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING ||
- state == YAFFS_BLOCK_STATE_ALLOCATING); c--) {
+ (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN ||
+ bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING);
+ c--) {
/* Scan backwards...
* Read the tags and decide what to do
*/
-
- chunk = blk * dev->param.chunks_per_block + c;
-
- result = yaffs_rd_chunk_tags_nand(dev, chunk, NULL,
- &tags);
-
- /* Let's have a good look at this chunk... */
-
- if (!tags.chunk_used) {
- /* An unassigned chunk in the block.
- * If there are used chunks after this one, then
- * it is a chunk that was skipped due to failing the erased
- * check. Just skip it so that it can be deleted.
- * But, more typically, We get here when this is an unallocated
- * chunk and his means that either the block is empty or
- * this is the one being allocated from
- */
-
- if (found_chunks) {
- /* This is a chunk that was skipped due to failing the erased check */
- } else if (c == 0) {
- /* We're looking at the first chunk in the block so the block is unused */
- state = YAFFS_BLOCK_STATE_EMPTY;
- dev->n_erased_blocks++;
- } else {
- if (state ==
- YAFFS_BLOCK_STATE_NEEDS_SCANNING
- || state ==
- YAFFS_BLOCK_STATE_ALLOCATING) {
- if (dev->seq_number ==
- bi->seq_number) {
- /* this is the block being allocated from */
-
- yaffs_trace(YAFFS_TRACE_SCAN,
- " Allocating from %d %d",
- blk, c);
-
- state =
- YAFFS_BLOCK_STATE_ALLOCATING;
- dev->alloc_block = blk;
- dev->alloc_page = c;
- dev->
- alloc_block_finder =
- blk;
- } else {
- /* This is a partially written block that is not
- * the current allocation block.
- */
-
- yaffs_trace(YAFFS_TRACE_SCAN,
- "Partially written block %d detected",
- blk);
- }
- }
- }
-
- dev->n_free_chunks++;
-
- } else if (tags.ecc_result == YAFFS_ECC_RESULT_UNFIXED) {
- yaffs_trace(YAFFS_TRACE_SCAN,
- " Unfixed ECC in chunk(%d:%d), chunk ignored",
- blk, c);
-
- dev->n_free_chunks++;
-
- } else if (tags.obj_id > YAFFS_MAX_OBJECT_ID ||
- tags.chunk_id > YAFFS_MAX_CHUNK_ID ||
- (tags.chunk_id > 0
- && tags.n_bytes > dev->data_bytes_per_chunk)
- || tags.seq_number != bi->seq_number) {
- yaffs_trace(YAFFS_TRACE_SCAN,
- "Chunk (%d:%d) with bad tags:obj = %d, chunk_id = %d, n_bytes = %d, ignored",
- blk, c, tags.obj_id,
- tags.chunk_id, tags.n_bytes);
-
- dev->n_free_chunks++;
-
- } else if (tags.chunk_id > 0) {
- /* chunk_id > 0 so it is a data chunk... */
- unsigned int endpos;
- u32 chunk_base =
- (tags.chunk_id -
- 1) * dev->data_bytes_per_chunk;
-
- found_chunks = 1;
-
- yaffs_set_chunk_bit(dev, blk, c);
- bi->pages_in_use++;
-
- in = yaffs_find_or_create_by_number(dev,
- tags.obj_id,
- YAFFS_OBJECT_TYPE_FILE);
- if (!in) {
- /* Out of memory */
- alloc_failed = 1;
- }
-
- if (in &&
- in->variant_type == YAFFS_OBJECT_TYPE_FILE
- && chunk_base <
- in->variant.file_variant.shrink_size) {
- /* This has not been invalidated by a resize */
- if (!yaffs_put_chunk_in_file
- (in, tags.chunk_id, chunk, -1)) {
- alloc_failed = 1;
- }
-
- /* File size is calculated by looking at the data chunks if we have not
- * seen an object header yet. Stop this practice once we find an object header.
- */
- endpos = chunk_base + tags.n_bytes;
-
- if (!in->valid && /* have not got an object header yet */
- in->variant.file_variant.
- scanned_size < endpos) {
- in->variant.file_variant.
- scanned_size = endpos;
- in->variant.file_variant.
- file_size = endpos;
- }
-
- } else if (in) {
- /* This chunk has been invalidated by a resize, or a past file deletion
- * so delete the chunk*/
- yaffs_chunk_del(dev, chunk, 1,
- __LINE__);
-
- }
- } else {
- /* chunk_id == 0, so it is an ObjectHeader.
- * Thus, we read in the object header and make the object
- */
- found_chunks = 1;
-
- yaffs_set_chunk_bit(dev, blk, c);
- bi->pages_in_use++;
-
- oh = NULL;
- in = NULL;
-
- if (tags.extra_available) {
- in = yaffs_find_or_create_by_number(dev,
- tags.
- obj_id,
- tags.
- extra_obj_type);
- if (!in)
- alloc_failed = 1;
- }
-
- if (!in ||
- (!in->valid && dev->param.disable_lazy_load)
- || tags.extra_shadows || (!in->valid
- && (tags.obj_id ==
- YAFFS_OBJECTID_ROOT
- || tags.
- obj_id ==
- YAFFS_OBJECTID_LOSTNFOUND)))
- {
-
- /* If we don't have valid info then we need to read the chunk
- * TODO In future we can probably defer reading the chunk and
- * living with invalid data until needed.
- */
-
- result = yaffs_rd_chunk_tags_nand(dev,
- chunk,
- chunk_data,
- NULL);
-
- oh = (struct yaffs_obj_hdr *)chunk_data;
-
- if (dev->param.inband_tags) {
- /* Fix up the header if they got corrupted by inband tags */
- oh->shadows_obj =
- oh->inband_shadowed_obj_id;
- oh->is_shrink =
- oh->inband_is_shrink;
- }
-
- if (!in) {
- in = yaffs_find_or_create_by_number(dev, tags.obj_id, oh->type);
- if (!in)
- alloc_failed = 1;
- }
-
- }
-
- if (!in) {
- /* TODO Hoosterman we have a problem! */
- yaffs_trace(YAFFS_TRACE_ERROR,
- "yaffs tragedy: Could not make object for object %d at chunk %d during scan",
- tags.obj_id, chunk);
- continue;
- }
-
- if (in->valid) {
- /* We have already filled this one.
- * We have a duplicate that will be discarded, but
- * we first have to suck out resize info if it is a file.
- */
-
- if ((in->variant_type ==
- YAFFS_OBJECT_TYPE_FILE) && ((oh
- &&
- oh->
- type
- ==
- YAFFS_OBJECT_TYPE_FILE)
- ||
- (tags.
- extra_available
- &&
- tags.
- extra_obj_type
- ==
- YAFFS_OBJECT_TYPE_FILE)))
- {
- u32 this_size =
- (oh) ? oh->
- file_size :
- tags.extra_length;
- u32 parent_obj_id =
- (oh) ? oh->parent_obj_id :
- tags.extra_parent_id;
-
- is_shrink =
- (oh) ? oh->
- is_shrink :
- tags.extra_is_shrink;
-
- /* If it is deleted (unlinked at start also means deleted)
- * we treat the file size as being zeroed at this point.
- */
- if (parent_obj_id ==
- YAFFS_OBJECTID_DELETED
- || parent_obj_id ==
- YAFFS_OBJECTID_UNLINKED) {
- this_size = 0;
- is_shrink = 1;
- }
-
- if (is_shrink
- && in->variant.file_variant.
- shrink_size > this_size)
- in->variant.
- file_variant.
- shrink_size =
- this_size;
-
- if (is_shrink)
- bi->has_shrink_hdr = 1;
-
- }
- /* Use existing - destroy this one. */
- yaffs_chunk_del(dev, chunk, 1,
- __LINE__);
-
- }
-
- if (!in->valid && in->variant_type !=
- (oh ? oh->type : tags.extra_obj_type))
- yaffs_trace(YAFFS_TRACE_ERROR,
- "yaffs tragedy: Bad object type, %d != %d, for object %d at chunk %d during scan",
- oh ?
- oh->type : tags.extra_obj_type,
- in->variant_type, tags.obj_id,
- chunk);
-
- if (!in->valid &&
- (tags.obj_id == YAFFS_OBJECTID_ROOT ||
- tags.obj_id ==
- YAFFS_OBJECTID_LOSTNFOUND)) {
- /* We only load some info, don't fiddle with directory structure */
- in->valid = 1;
-
- if (oh) {
-
- in->yst_mode = oh->yst_mode;
- yaffs_load_attribs(in, oh);
- in->lazy_loaded = 0;
- } else {
- in->lazy_loaded = 1;
- }
- in->hdr_chunk = chunk;
-
- } else if (!in->valid) {
- /* we need to load this info */
-
- in->valid = 1;
- in->hdr_chunk = chunk;
-
- if (oh) {
- in->variant_type = oh->type;
-
- in->yst_mode = oh->yst_mode;
- yaffs_load_attribs(in, oh);
-
- if (oh->shadows_obj > 0)
- yaffs_handle_shadowed_obj
- (dev,
- oh->shadows_obj,
- 1);
-
- yaffs_set_obj_name_from_oh(in,
- oh);
- parent =
- yaffs_find_or_create_by_number
- (dev, oh->parent_obj_id,
- YAFFS_OBJECT_TYPE_DIRECTORY);
-
- file_size = oh->file_size;
- is_shrink = oh->is_shrink;
- equiv_id = oh->equiv_id;
-
- } else {
- in->variant_type =
- tags.extra_obj_type;
- parent =
- yaffs_find_or_create_by_number
- (dev, tags.extra_parent_id,
- YAFFS_OBJECT_TYPE_DIRECTORY);
- file_size = tags.extra_length;
- is_shrink =
- tags.extra_is_shrink;
- equiv_id = tags.extra_equiv_id;
- in->lazy_loaded = 1;
-
- }
- in->dirty = 0;
-
- if (!parent)
- alloc_failed = 1;
-
- /* directory stuff...
- * hook up to parent
- */
-
- if (parent && parent->variant_type ==
- YAFFS_OBJECT_TYPE_UNKNOWN) {
- /* Set up as a directory */
- parent->variant_type =
- YAFFS_OBJECT_TYPE_DIRECTORY;
- INIT_LIST_HEAD(&parent->
- variant.dir_variant.children);
- } else if (!parent
- || parent->variant_type !=
- YAFFS_OBJECT_TYPE_DIRECTORY) {
- /* Hoosterman, another problem....
- * We're trying to use a non-directory as a directory
- */
-
- yaffs_trace(YAFFS_TRACE_ERROR,
- "yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found."
- );
- parent = dev->lost_n_found;
- }
-
- yaffs_add_obj_to_dir(parent, in);
-
- is_unlinked = (parent == dev->del_dir)
- || (parent == dev->unlinked_dir);
-
- if (is_shrink) {
- /* Mark the block as having a shrink header */
- bi->has_shrink_hdr = 1;
- }
-
- /* Note re hardlinks.
- * Since we might scan a hardlink before its equivalent object is scanned
- * we put them all in a list.
- * After scanning is complete, we should have all the objects, so we run
- * through this list and fix up all the chains.
- */
-
- switch (in->variant_type) {
- case YAFFS_OBJECT_TYPE_UNKNOWN:
- /* Todo got a problem */
- break;
- case YAFFS_OBJECT_TYPE_FILE:
-
- if (in->variant.
- file_variant.scanned_size <
- file_size) {
- /* This covers the case where the file size is greater
- * than where the data is
- * This will happen if the file is resized to be larger
- * than its current data extents.
- */
- in->variant.
- file_variant.
- file_size =
- file_size;
- in->variant.
- file_variant.
- scanned_size =
- file_size;
- }
-
- if (in->variant.file_variant.
- shrink_size > file_size)
- in->variant.
- file_variant.
- shrink_size =
- file_size;
-
- break;
- case YAFFS_OBJECT_TYPE_HARDLINK:
- if (!is_unlinked) {
- in->variant.
- hardlink_variant.
- equiv_id = equiv_id;
- in->hard_links.next =
- (struct list_head *)
- hard_list;
- hard_list = in;
- }
- break;
- case YAFFS_OBJECT_TYPE_DIRECTORY:
- /* Do nothing */
- break;
- case YAFFS_OBJECT_TYPE_SPECIAL:
- /* Do nothing */
- break;
- case YAFFS_OBJECT_TYPE_SYMLINK:
- if (oh) {
- in->variant.
- symlink_variant.
- alias =
- yaffs_clone_str(oh->
- alias);
- if (!in->variant.
- symlink_variant.
- alias)
- alloc_failed =
- 1;
- }
- break;
- }
-
- }
-
- }
-
- } /* End of scanning for each chunk */
-
- if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
- /* If we got this far while scanning, then the block is fully allocated. */
- state = YAFFS_BLOCK_STATE_FULL;
+ if (yaffs2_scan_chunk(dev, bi, blk, c,
+ &found_chunks, chunk_data,
+ &hard_list, summary_available) ==
+ YAFFS_FAIL)
+ alloc_failed = 1;
}
- bi->block_state = state;
+ if (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN) {
+ /* If we got this far while scanning, then the block
+ * is fully allocated. */
+ bi->block_state = YAFFS_BLOCK_STATE_FULL;
+ }
/* Now let's see if it was dirty */
if (bi->pages_in_use == 0 &&
@@ -1565,7 +1505,6 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
bi->block_state == YAFFS_BLOCK_STATE_FULL) {
yaffs_block_became_dirty(dev, blk);
}
-
}
yaffs_skip_rest_of_block(dev);
@@ -1577,12 +1516,12 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
/* Ok, we've done all the scanning.
* Fix up the hard link chains.
- * We should now have scanned all the objects, now it's time to add these
+ * We have scanned all the objects, now it's time to add these
* hardlinks.
*/
- yaffs_link_fixup(dev, hard_list);
+ yaffs_link_fixup(dev, &hard_list);
- yaffs_release_temp_buffer(dev, chunk_data, __LINE__);
+ yaffs_release_temp_buffer(dev, chunk_data);
if (alloc_failed)
return YAFFS_FAIL;
diff --git a/yaffs_yaffs2.h b/yaffs_yaffs2.h
index e1a9287..2363bfd 100644
--- a/yaffs_yaffs2.h
+++ b/yaffs_yaffs2.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
diff --git a/yportenv_multi.h b/yportenv_multi.h
index 10e284e..666d909 100644
--- a/yportenv_multi.h
+++ b/yportenv_multi.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -49,6 +49,7 @@
#include <linux/sort.h>
#include <linux/bitops.h>
+/* These type wrappings are used to support Unicode names in WinCE. */
#define YCHAR char
#define YUCHAR unsigned char
#define _Y(x) x
@@ -72,22 +73,10 @@
({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; })
-#ifndef Y_DUMP_STACK
-#define Y_DUMP_STACK() dump_stack()
-#endif
-
#define yaffs_trace(msk, fmt, ...) do { \
- if(yaffs_trace_mask & (msk)) \
+ if (yaffs_trace_mask & (msk)) \
printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \
-} while(0)
-
-#ifndef YBUG
-#define YBUG() do {\
- yaffs_trace(YAFFS_TRACE_BUG,\
- "bug " __FILE__ " %d",\
- __LINE__);\
- Y_DUMP_STACK();\
} while (0)
-#endif
+
#endif
diff --git a/yportenv_single.h b/yportenv_single.h
index 8183425..d819475 100644
--- a/yportenv_single.h
+++ b/yportenv_single.h
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet another Flash File System . 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 Charles Manning <charles@aleph1.co.uk>
@@ -31,6 +31,7 @@
#include <linux/sort.h>
#include <linux/bitops.h>
+/* These type wrappings are used to support Unicode names in WinCE. */
#define YCHAR char
#define YUCHAR unsigned char
#define _Y(x) x
@@ -48,22 +49,13 @@
#define compile_time_assertion(assertion) \
({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; })
-
-#ifndef Y_DUMP_STACK
-#define Y_DUMP_STACK() dump_stack()
-#endif
-
+#ifdef CONFIG_YAFFS_DEBUG
#define yaffs_trace(msk, fmt, ...) do { \
- if(yaffs_trace_mask & (msk)) \
+ if (yaffs_trace_mask & (msk)) \
printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \
-} while(0)
-
-#ifndef YBUG
-#define YBUG() do {\
- yaffs_trace(YAFFS_TRACE_BUG,\
- "bug " __FILE__ " %d",\
- __LINE__);\
- Y_DUMP_STACK();\
+} while (0)
+#else
+#define yaffs_trace(msk, fmt, ...) do { \
} while (0)
#endif