projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3442562
)
Add yaffs2 autoselection
author
charles
<charles>
Wed, 14 Dec 2005 01:18:45 +0000
(
01:18
+0000)
committer
charles
<charles>
Wed, 14 Dec 2005 01:18:45 +0000
(
01:18
+0000)
Kconfig
patch
|
blob
|
history
yaffs_fs.c
patch
|
blob
|
history
diff --git
a/Kconfig
b/Kconfig
index 7127050336ce79d38cb1d4d175bfba94644a4607..73e37a09e613bb5f68e68a16728991f595fc7bc1 100644
(file)
--- a/
Kconfig
+++ b/
Kconfig
@@
-58,6
+58,17
@@
config YAFFS_YAFFS2
If unsure, say Y.
If unsure, say Y.
+config YAFFS_AUTO_YAFFS2
+ bool "Autoselect yaffs2 format"
+ depends on YAFFS_YAFFS2
+ default y
+ help
+ Without this, you need to explicitely use yaffs2 as the file
+ system type. With this, you can say "yaffs" and yaffs or yaffs2
+ will be used depending on the device page size.
+
+ If unsure, say Y.
+
config YAFFS_DISABLE_WIDE_TNODES
bool "Turn off wide tnodes"
depends on YAFFS_FS
config YAFFS_DISABLE_WIDE_TNODES
bool "Turn off wide tnodes"
depends on YAFFS_FS
diff --git
a/yaffs_fs.c
b/yaffs_fs.c
index b9d440bd3745632a99f8bfd8300680a1ae1a798c..2a631623f82eb2563d47c57bac8047360e0cd52b 100644
(file)
--- a/
yaffs_fs.c
+++ b/
yaffs_fs.c
@@
-31,7
+31,7
@@
*/
const char *yaffs_fs_c_version =
*/
const char *yaffs_fs_c_version =
- "$Id: yaffs_fs.c,v 1.3
6 2005-12-08 00:54:5
5 charles Exp $";
+ "$Id: yaffs_fs.c,v 1.3
7 2005-12-14 01:18:4
5 charles Exp $";
extern const char *yaffs_guts_c_version;
#include <linux/config.h>
extern const char *yaffs_guts_c_version;
#include <linux/config.h>
@@
-1364,6
+1364,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));
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));
+
+#if 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 */
if (yaffsVersion == 2) {
/* Check for version 2 style functions */