/* Sort data entries with the latest version last, so that if there
* is overlapping data the latest version will be used.
*/
/* Sort data entries with the latest version last, so that if there
* is overlapping data the latest version will be used.
*/
pL = (struct b_lists *)part->jffs2_priv;
memset(pL, 0, sizeof(*pL));
pL = (struct b_lists *)part->jffs2_priv;
memset(pL, 0, sizeof(*pL));
/* Find file size before loading any data, so fragments that
* start past the end of file can be ignored. A fragment
* that is partially in the file is loaded, so extra data may
/* Find file size before loading any data, so fragments that
* start past the end of file can be ignored. A fragment
* that is partially in the file is loaded, so extra data may
/* get actual file length from the newest node */
if (jNode->version >= latestVersion) {
totalSize = jNode->isize;
/* get actual file length from the newest node */
if (jNode->version >= latestVersion) {
totalSize = jNode->isize;
case JFFS2_COMPR_ZLIB:
ret = zlib_decompress(src, dst, inode->csize, inode->dsize);
break;
case JFFS2_COMPR_ZLIB:
ret = zlib_decompress(src, dst, inode->csize, inode->dsize);
break;
case JFFS2_COMPR_LZO:
ret = lzo_decompress(src, dst, inode->csize, inode->dsize);
break;
case JFFS2_COMPR_LZO:
ret = lzo_decompress(src, dst, inode->csize, inode->dsize);
break;
} else if (node->nodetype == JFFS2_NODETYPE_CLEANMARKER) {
if (node->totlen != sizeof(struct jffs2_unknown_node))
printf("OOPS Cleanmarker has bad size "
} else if (node->nodetype == JFFS2_NODETYPE_CLEANMARKER) {
if (node->totlen != sizeof(struct jffs2_unknown_node))
printf("OOPS Cleanmarker has bad size "
sizeof(struct jffs2_unknown_node));
} else if (node->nodetype == JFFS2_NODETYPE_PADDING) {
if (node->totlen < sizeof(struct jffs2_unknown_node))
printf("OOPS Padding has bad size "
sizeof(struct jffs2_unknown_node));
} else if (node->nodetype == JFFS2_NODETYPE_PADDING) {
if (node->totlen < sizeof(struct jffs2_unknown_node))
printf("OOPS Padding has bad size "
- printf("Unknown node type: %x len %d "
- "offset 0x%x\n", node->nodetype,
+ printf("Unknown node type: %x len %d offset 0x%x\n",
+ node->nodetype,