Skip to contentSkip to conversation

JFFS2: drop support for LZARI compression mode

PATCH New Wolfgang Denk 1 participant 2 messages Jan 15, 2010 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 JFFS2: drop support for LZARI compression mode

Support for LZARI compression mode was added based on a MTD CVS snapshot of March 13, 2005. However, fs/jffs2/compr_lzari.c contains contradictory licensing terms: the original copyright clause says "All rights reserved. Permission granted for non-commercial use.", but later reference to the file 'LICENCE' in the jffs2 directory was added which says GPL v2 or later.

As no boards ever used LZARI compression, and this file is also not present in recent MTD code, we resolve this conflict by removing the conflicting file and references to it.

Also copy the referenced but missing file 'LICENCE' from the current MTD source tree.

---
 fs/jffs2/LICENCE            |   30 +++++
 fs/jffs2/Makefile           |    3 +-
 fs/jffs2/compr_lzari.c      |  259 -------------------------------------------
 fs/jffs2/jffs2_1pass.c      |    8 +-
 fs/jffs2/jffs2_nand_1pass.c |    8 +-
 include/jffs2/jffs2.h       |    9 +-
 6 files changed, 38 insertions(+), 279 deletions(-)
 create mode 100644 fs/jffs2/LICENCE
 delete mode 100644 fs/jffs2/compr_lzari.c
fs/jffs2/LICENCE new file +30 -0
new file mode 100644
index 0000000..5628859
@@ -0,0 +1,30 @@
+The files in this directory and elsewhere which refer to this LICENCE
+file are part of JFFS2, the Journalling Flash File System v2.
+
+	Copyright ?? 2001-2007 Red Hat, Inc. and others
+
+JFFS2 is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 or (at your option) any later 
+version.
+
+JFFS2 is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with JFFS2; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+As a special exception, if other files instantiate templates or use
+macros or inline functions from these files, or you compile these
+files and link them with other works to produce a work based on these
+files, these files do not by themselves cause the resulting work to be
+covered by the GNU General Public License. However the source code for
+these files must still be made available in accordance with section (3)
+of the GNU General Public License.
+
+This exception does not invalidate any other reasons why a work based on
+this file might be covered by the GNU General Public License.
+
fs/jffs2/Makefile +1 -2
index fd6a105..7c9fb41 100644
@@ -27,8 +27,7 @@ LIB	= $(obj)libjffs2.a
 
 AOBJS	=
 ifdef CONFIG_CMD_JFFS2
-COBJS-$(CONFIG_JFFS2_LZO_LZARI) += compr_lzari.o
-COBJS-$(CONFIG_JFFS2_LZO_LZARI) += compr_lzo.o
+COBJS-$(CONFIG_JFFS2_LZO) += compr_lzo.o
 COBJS-y += compr_rtime.o
 COBJS-y += compr_rubin.o
 COBJS-y += compr_zlib.o
fs/jffs2/compr_lzari.c deleted +0 -259

259 lines not on this page · raw message

fs/jffs2/jffs2_1pass.c +2 -6
index 1923ed9..93651f5 100644
@@ -471,9 +471,8 @@ static char *compr_names[] = {
 	"COPY",
 	"DYNRUBIN",
 	"ZLIB",
-#if defined(CONFIG_JFFS2_LZO_LZARI)
+#if defined(CONFIG_JFFS2_LZO)
 	"LZO",
-	"LZARI",
 #endif
 };
 
@@ -781,13 +780,10 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest)
 				case JFFS2_COMPR_ZLIB:
 					ret = zlib_decompress(src, lDest, jNode->csize, jNode->dsize);
 					break;
-#if defined(CONFIG_JFFS2_LZO_LZARI)
+#if defined(CONFIG_JFFS2_LZO)
 				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 */
fs/jffs2/jffs2_nand_1pass.c +2 -6
index fe8c70d..3982003 100644
@@ -34,9 +34,8 @@ static char *compr_names[] = {
 	"COPY",
 	"DYNRUBIN",
 	"ZLIB",
-#if defined(CONFIG_JFFS2_LZO_LZARI)
+#if defined(CONFIG_JFFS2_LZO)
 	"LZO",
-	"LZARI",
 #endif
 };
 
@@ -344,13 +343,10 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 ino, char *dest,
 			case JFFS2_COMPR_ZLIB:
 				ret = zlib_decompress(src, dst, inode->csize, inode->dsize);
 				break;
-#if defined(CONFIG_JFFS2_LZO_LZARI)
+#if defined(CONFIG_JFFS2_LZO)
 			case JFFS2_COMPR_LZO:
 				ret = lzo_decompress(src, dst, inode->csize, inode->dsize);
 				break;
-			case JFFS2_COMPR_LZARI:
-				ret = lzari_decompress(src, dst, inode->csize, inode->dsize);
-				break;
 #endif
 			default:
 				/* unknown */
include/jffs2/jffs2.h +3 -6
index ed96bab..651f94c 100644
@@ -68,10 +68,9 @@
 #define JFFS2_COMPR_COPY	0x04
 #define JFFS2_COMPR_DYNRUBIN	0x05
 #define JFFS2_COMPR_ZLIB	0x06
-#if defined(CONFIG_JFFS2_LZO_LZARI)
+#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
@@ -226,11 +225,9 @@ 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_LZO_LZARI)
+#if defined(CONFIG_JFFS2_LZO)
 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);
Signature · 1 line
1.6.2.5
#1 lore raw

PATCH 1/1 JFFS2: drop support for LZARI compression mode

Quoted 6 lines · In message <[email protected]> I wrote:

Support for LZARI compression mode was added based on a MTD CVS snapshot of March 13, 2005. However, fs/jffs2/compr_lzari.c contains contradictory licensing terms: the original copyright clause says "All rights reserved. Permission granted for non-commercial use.", but later reference to the file 'LICENCE' in the jffs2 directory was added which says GPL v2 or later.

Oops. Sent a dupe by accident. Please ignore.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Perl itself is  usually  pretty  good  about  telling  you  what  you
shouldn't do. :-)     - Larry Wall in <[email protected]>