X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=fs%2Fjffs2%2Fjffs2_private.h;h=06b6ca29194dd93cb0fcb3664fa674fb8711b213;hb=a9bdd67653c026d3f568375ca8e48fb5014c62c9;hp=3e1fff4739d0424e5aa2abedf36c86f2f429b083;hpb=74f92e6a3f884b7fe86d2fb2acc114347defb0ae;p=u-boot diff --git a/fs/jffs2/jffs2_private.h b/fs/jffs2/jffs2_private.h index 3e1fff4739..06b6ca2919 100644 --- a/fs/jffs2/jffs2_private.h +++ b/fs/jffs2/jffs2_private.h @@ -7,12 +7,13 @@ struct b_node { u32 offset; struct b_node *next; + enum { CRC_UNKNOWN = 0, CRC_OK, CRC_BAD } datacrc; }; struct b_list { struct b_node *listTail; struct b_node *listHead; -#ifdef CFG_JFFS2_SORT_FRAGMENTS +#ifdef CONFIG_SYS_JFFS2_SORT_FRAGMENTS struct b_node *listLast; int (*listCompare)(struct b_node *new, struct b_node *node); u32 listLoops; @@ -24,7 +25,7 @@ struct b_list { struct b_lists { struct b_list dir; struct b_list frag; - + void *readbuf; }; struct b_compr_info { @@ -89,12 +90,16 @@ 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)) { + ((int) &node->node_crc + sizeof (node->node_crc)), + node->csize)) { return 0; } else { return 1; } } +#if defined(CONFIG_SYS_JFFS2_SORT_FRAGMENTS) +/* External merge sort. */ +int sort_list(struct b_list *list); +#endif #endif /* jffs2_private.h */