a single #define.
size.
* Major upate of JFFS2 code; now in sync with snapshot of MTD CVS of
- March 13, 2005); new configuration options CONFIG_JFFS2_LZO and
- CONFIG_JFFS2_LZARI are added. Both are undefined by default.
+ March 13, 2005); new configuration option CONFIG_JFFS2_LZO_LZARI
+ added to support LZO and LZARI compression modes (undefined by
+ default).
* Fix problem with symbolic links in JFFS2 code.
#include <config.h>
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZARI))
+#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI))
#include <linux/stddef.h>
#include <jffs2/jffs2.h>
{
return Decode(data_in, cpage_out, srclen, destlen);
}
-#endif /* ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZARI)) */
+#endif /* ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) */
#include <config.h>
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO))
+#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI))
#include <linux/stddef.h>
#include <jffs2/jffs2.h>
return lzo1x_decompress (data_in, srclen, cpage_out, &outlen, NULL);
}
-#endif /* ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO)) */
+#endif /* ((CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_LZO_LZARI)) */
"COPY",
"DYNRUBIN",
"ZLIB",
-#if defined(CONFIG_JFFS2_LZO)
+#if defined(CONFIG_JFFS2_LZO_LZARI)
"LZO",
-#endif
-#if defined(CONFIG_JFFS2_LZARI)
"LZARI",
#endif
};
case JFFS2_COMPR_ZLIB:
ret = zlib_decompress(src, lDest, jNode->csize, jNode->dsize);
break;
-#if defined(CONFIG_JFFS2_LZARI)
- case JFFS2_COMPR_LZARI:
- ret = lzari_decompress(src, lDest, jNode->csize, jNode->dsize);
- break;
-#endif
-#if defined(CONFIG_JFFS2_LZO)
+#if defined(CONFIG_JFFS2_LZO_LZARI)
case JFFS2_COMPR_LZO:
ret = lzo_decompress(src, lDest, jNode->csize, jNode->dsize);
break;
+ case JFFS2_COMPR_LZARI:
+ ret = lzari_decompress(src, lDest, jNode->csize, jNode->dsize);
+ break;
#endif
default:
/* unknown */
#define JFFS2_COMPR_COPY 0x04
#define JFFS2_COMPR_DYNRUBIN 0x05
#define JFFS2_COMPR_ZLIB 0x06
+#if defined(CONFIG_JFFS2_LZO_LZARI)
#define JFFS2_COMPR_LZO 0x07
#define JFFS2_COMPR_LZARI 0x08
#define JFFS2_NUM_COMPR 9
-
+#else
+#define JFFS2_NUM_COMPR 7
+#endif
+
/* Compatibility flags. */
#define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */
#define JFFS2_NODE_ACCURATE 0x2000
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)
+#if defined(CONFIG_JFFS2_LZO_LZARI)
int lzo_decompress(unsigned char *data_in, unsigned char *cpage_out,
u32 srclen, u32 destlen);
+int lzari_decompress(unsigned char *data_in, unsigned char *cpage_out,
+ u32 srclen, u32 destlen);
#endif
char *mkmodestr(unsigned long mode, char *str);