diff options
author | wdenk <wdenk> | 2003-03-14 20:47:52 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-03-14 20:47:52 +0000 |
commit | 06d01dbe000057e5df4af0f113242f0eba716340 (patch) | |
tree | 9188617ad1907e44f41910b99af9bde7258338f9 /fs/jffs2/jffs2_private.h | |
parent | 09127c60964c47621937ada7b0ccbf0c26329376 (diff) | |
download | u-boot-imx-06d01dbe000057e5df4af0f113242f0eba716340.zip u-boot-imx-06d01dbe000057e5df4af0f113242f0eba716340.tar.gz u-boot-imx-06d01dbe000057e5df4af0f113242f0eba716340.tar.bz2 |
* Avoid flicker on the TRAB's VFD by synchronizing the enable with
the HSYNC/VSYNC. Requires new CPLD code (Version 101 for Rev. 100
boards, version 153 for Rev. 200 boards).
* Patch by Vladimir Gurevich, 12 Mar 2003:
Fix relocation problem of statically initialized string pointers
in common/cmd_pci.c
* Patch by Kai-Uwe Blöm, 12 Mar 2003:
Cleanup & bug fixes for JFFS2 code:
- the memory mangement was broken. It caused havoc on malloc by
writing beyond the block boundaries.
- the length calculation for files was wrong, sometimes resulting
in short file reads.
- data copying now optionally takes fragment version numbers into
account, to avoid copying from older data.
See doc/README.JFFS2 for details.
Diffstat (limited to 'fs/jffs2/jffs2_private.h')
-rw-r--r-- | fs/jffs2/jffs2_private.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/fs/jffs2/jffs2_private.h b/fs/jffs2/jffs2_private.h index ca0af1f..c6d5fe3 100644 --- a/fs/jffs2/jffs2_private.h +++ b/fs/jffs2/jffs2_private.h @@ -3,23 +3,31 @@ #include <jffs2/jffs2.h> + struct b_node { u32 offset; struct b_node *next; }; +struct b_list { + struct b_node *listTail; + struct b_node *listHead; +#ifdef CFG_JFFS2_SORT_FRAGMENTS + struct b_node *listLast; + int (*listCompare)(struct b_node *new, struct b_node *node); + u32 listLoops; +#endif + u32 listCount; + struct mem_block *listMemBase; +}; + struct b_lists { char *partOffset; - struct b_node *dirListTail; - struct b_node *dirListHead; - u32 dirListCount; - u32 dirListMemBase; - struct b_node *fragListTail; - struct b_node *fragListHead; - u32 fragListCount; - u32 fragListMemBase; + struct b_list dir; + struct b_list frag; }; + struct b_compr_info { u32 num_frags; u32 compr_sum; @@ -33,11 +41,14 @@ struct b_jffs2_info { static inline int hdr_crc(struct jffs2_unknown_node *node) { +#if 1 u32 crc = crc32_no_comp(0, (unsigned char *)node, sizeof(struct jffs2_unknown_node) - 4); - u32 crc_blah = crc32_no_comp(~0, (unsigned char *)node, sizeof(struct jffs2_unknown_node) - 4); - - crc_blah ^= ~0; +#else + /* what's the semantics of this? why is this here? */ + u32 crc = crc32_no_comp(~0, (unsigned char *)node, sizeof(struct jffs2_unknown_node) - 4); + crc ^= ~0; +#endif if (node->hdr_crc != crc) { return 0; } else { |