diff --git a/src/preview-kit/linux-2.6.34/fs/yaffs2/yaffs_guts.c b/src/preview-kit/linux-2.6.34/fs/yaffs2/yaffs_guts.c
index 968223e..ec677a5 100755
--- a/src/preview-kit/linux-2.6.34/fs/yaffs2/yaffs_guts.c
+++ b/src/preview-kit/linux-2.6.34/fs/yaffs2/yaffs_guts.c
@@ -6520,10 +6520,7 @@ static int yaffs_ScanBackwards(yaffs_Device *dev)
in->variantType, tags.objectId,
chunk));
- if (!in->valid &&
- (tags.objectId == YAFFS_OBJECTID_ROOT ||
- tags.objectId ==
- YAFFS_OBJECTID_LOSTNFOUND)) {
+ if (0) {
/* We only load some info, don't fiddle with directory structure */
in->valid = 1;
@@ -6554,7 +6551,7 @@ static int yaffs_ScanBackwards(yaffs_Device *dev)
in->hdrChunk = chunk;
- } else if (!in->valid) {
+ } else if (!0) {
/* we need to load this info */
in->valid = 1;
@@ -7557,6 +7554,7 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
yaffs_EmptyLostAndFound(dev);
}
+#if 0
if (init_failed) {
/* Clean up the mess */
T(YAFFS_TRACE_TRACING,
@@ -7566,6 +7564,8 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
return YAFFS_FAIL;
}
+#endif
+
/* Zero out stats */
dev->nPageReads = 0;
index 968223e..ec677a5 100755
--- a/src/preview-kit/linux-2.6.34/fs/yaffs2/yaffs_guts.c
+++ b/src/preview-kit/linux-2.6.34/fs/yaffs2/yaffs_guts.c
@@ -6520,10 +6520,7 @@ static int yaffs_ScanBackwards(yaffs_Device *dev)
in->variantType, tags.objectId,
chunk));
- if (!in->valid &&
- (tags.objectId == YAFFS_OBJECTID_ROOT ||
- tags.objectId ==
- YAFFS_OBJECTID_LOSTNFOUND)) {
+ if (0) {
/* We only load some info, don't fiddle with directory structure */
in->valid = 1;
@@ -6554,7 +6551,7 @@ static int yaffs_ScanBackwards(yaffs_Device *dev)
in->hdrChunk = chunk;
- } else if (!in->valid) {
+ } else if (!0) {
/* we need to load this info */
in->valid = 1;
@@ -7557,6 +7554,7 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
yaffs_EmptyLostAndFound(dev);
}
+#if 0
if (init_failed) {
/* Clean up the mess */
T(YAFFS_TRACE_TRACING,
@@ -7566,6 +7564,8 @@ int yaffs_GutsInitialise(yaffs_Device *dev)
return YAFFS_FAIL;
}
+#endif
+
/* Zero out stats */
dev->nPageReads = 0;
dev->nPageWrites = 0;
通过上面代码修改,可以使得yaffs2文件系统强行挂载上来,然后可以到文件系统挂载的分区里面拿回我们重要的数据。