summaryrefslogtreecommitdiff
path: root/fs/jffs2/jffs2_private.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-12 16:05:05 +0100
committerWolfgang Denk <wd@pollux.denx.de>2006-03-12 16:05:05 +0100
commit74f92e6a3f884b7fe86d2fb2acc114347defb0ae (patch)
tree97c39697321dd4baacfd3bb97686db855a49930c /fs/jffs2/jffs2_private.h
parent8e7b703a62783f0e88d3a7e4b1dd1c033bc95ec8 (diff)
downloadu-boot-imx-74f92e6a3f884b7fe86d2fb2acc114347defb0ae.zip
u-boot-imx-74f92e6a3f884b7fe86d2fb2acc114347defb0ae.tar.gz
u-boot-imx-74f92e6a3f884b7fe86d2fb2acc114347defb0ae.tar.bz2
Add crc of data to jffs2 (in jffs2_1pass_build_lists()).
Patch by Rick Bronson, 15 Jun 2005
Diffstat (limited to 'fs/jffs2/jffs2_private.h')
-rw-r--r--fs/jffs2/jffs2_private.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/jffs2/jffs2_private.h b/fs/jffs2/jffs2_private.h
index 65ca6eb..3e1fff4 100644
--- a/fs/jffs2/jffs2_private.h
+++ b/fs/jffs2/jffs2_private.h
@@ -85,4 +85,16 @@ inode_crc(struct jffs2_raw_inode *node)
}
}
+static inline int
+data_crc(struct jffs2_raw_inode *node)
+{
+ if (node->data_crc != crc32_no_comp(0, (unsigned char *)
+ ((int) &node->node_crc + sizeof (node->node_crc)),
+ node->csize)) {
+ return 0;
+ } else {
+ return 1;
+ }
+}
+
#endif /* jffs2_private.h */