X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_fs.c;h=3ded1fe8751bdfb8e52aa17daf507bd303702c87;hp=b9d440bd3745632a99f8bfd8300680a1ae1a798c;hb=e8e4b279b5993f98cdba15a517c3e1afe6405412;hpb=b45320519225450519711395e8ef4ed106701d21 diff --git a/yaffs_fs.c b/yaffs_fs.c index b9d440b..3ded1fe 100644 --- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -31,7 +31,7 @@ */ const char *yaffs_fs_c_version = - "$Id: yaffs_fs.c,v 1.36 2005-12-08 00:54:55 charles Exp $"; + "$Id: yaffs_fs.c,v 1.39 2006-01-24 22:22:52 tpoynor Exp $"; extern const char *yaffs_guts_c_version; #include @@ -171,6 +171,10 @@ static struct file_operations yaffs_file_operations = { .mmap = generic_file_mmap, .flush = yaffs_file_flush, .fsync = yaffs_sync_object, +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) + .sendfile = generic_file_sendfile, +#endif + }; static struct inode_operations yaffs_file_inode_operations = { @@ -1364,6 +1368,15 @@ static struct super_block *yaffs_internal_read_super(int yaffsVersion, T(YAFFS_TRACE_OS, (" oobsize %d\n", mtd->oobsize)); T(YAFFS_TRACE_OS, (" erasesize %d\n", mtd->erasesize)); T(YAFFS_TRACE_OS, (" size %d\n", mtd->size)); + +#ifdef CONFIG_YAFFS_AUTO_YAFFS2 + + if (yaffsVersion == 1 && + mtd->oobblock >= 2048) { + T(YAFFS_TRACE_ALWAYS,("yaffs: auto selecting yaffs2\n")); + yaffsVersion = 2; + } +#endif if (yaffsVersion == 2) { /* Check for version 2 style functions */