X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fjffs2%2Fjffs2.h;h=651f94cf381edd2a286dadc9ff4e61225e38f35e;hb=74d90d17eebfeeefd91776e3deb7901c122bef7f;hp=2fec488d1af956302b47fc642289221c290fa067;hpb=07cc0999413481568b38b8d0e5f3d7514d9540b0;p=oweals%2Fu-boot.git diff --git a/include/jffs2/jffs2.h b/include/jffs2/jffs2.h index 2fec488d1a..651f94cf38 100644 --- a/include/jffs2/jffs2.h +++ b/include/jffs2/jffs2.h @@ -50,6 +50,9 @@ #define JFFS2_EMPTY_BITMASK 0xffff #define JFFS2_DIRTY_BITMASK 0x0000 +/* Summary node MAGIC marker */ +#define JFFS2_SUM_MAGIC 0x02851885 + /* We only allow a single char for length, and 0xFF is empty flash so we don't want it confused with a real length. Hence max 254. */ @@ -65,9 +68,12 @@ #define JFFS2_COMPR_COPY 0x04 #define JFFS2_COMPR_DYNRUBIN 0x05 #define JFFS2_COMPR_ZLIB 0x06 +#if defined(CONFIG_JFFS2_LZO) #define JFFS2_COMPR_LZO 0x07 -#define JFFS2_COMPR_LZARI 0x08 -#define JFFS2_NUM_COMPR 9 +#define JFFS2_NUM_COMPR 8 +#else +#define JFFS2_NUM_COMPR 7 +#endif /* Compatibility flags. */ #define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */ @@ -85,6 +91,7 @@ #define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2) #define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) #define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4) +#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) /* Maybe later... */ /*#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) */ @@ -162,9 +169,24 @@ struct jffs2_raw_inode /* __u8 data[dsize]; */ } __attribute__((packed)); +struct jffs2_raw_summary +{ + __u16 magic; + __u16 nodetype; /* = JFFS2_NODETYPE_SUMMARY */ + __u32 totlen; + __u32 hdr_crc; + __u32 sum_num; /* number of sum entries*/ + __u32 cln_mkr; /* clean marker size, 0 = no cleanmarker */ + __u32 padded; /* sum of the size of padding nodes */ + __u32 sum_crc; /* summary information crc */ + __u32 node_crc; /* node crc */ + __u32 sum[0]; /* inode summary info */ +}; + union jffs2_node_union { struct jffs2_raw_inode i; struct jffs2_raw_dirent d; + struct jffs2_raw_summary s; struct jffs2_unknown_node u; } __attribute__((packed)); @@ -203,10 +225,6 @@ void dynrubin_decompress(unsigned char *data_in, unsigned char *cpage_out, unsigned long sourcelen, unsigned long dstlen); long zlib_decompress(unsigned char *data_in, unsigned char *cpage_out, __u32 srclen, __u32 destlen); -#if defined(CONFIG_JFFS2_LZARI) -int lzari_decompress(unsigned char *data_in, unsigned char *cpage_out, - u32 srclen, u32 destlen); -#endif #if defined(CONFIG_JFFS2_LZO) int lzo_decompress(unsigned char *data_in, unsigned char *cpage_out, u32 srclen, u32 destlen);