X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=fs%2Fjffs2%2Fjffs2_private.h;h=46ed644e4d4a6dd795ae70a639484447f660751c;hb=c148f24c15743a02e855636e6bed013bd121f7f2;hp=65ca6eb98f239ab26599ac2a6423b6a04c48d145;hpb=700a0c648df72f2c8e0589c0d0470b5ffd7cab7b;p=u-boot diff --git a/fs/jffs2/jffs2_private.h b/fs/jffs2/jffs2_private.h index 65ca6eb98f..46ed644e4d 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 */