mtd/fs/jffs2 compr.c,1.41,1.42
David Woodhouse
dwmw2 at infradead.org
Sat Aug 7 17:56:11 EDT 2004
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv20641
Modified Files:
compr.c
Log Message:
If comprtype is one of the old ones, and usercompr wasn't zero, that's
due to a bug in the old code. Fix it up accordingly.
Index: compr.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/compr.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- compr.c 24 Jun 2004 09:51:38 -0000 1.41
+++ compr.c 7 Aug 2004 21:56:08 -0000 1.42
@@ -180,6 +180,11 @@
struct jffs2_compressor *this;
int ret;
+ /* Older code had a bug where it would write non-zero 'usercompr'
+ fields. Deal with it. */
+ if ((comprtype & 0xff) <= JFFS2_COMPR_ZLIB)
+ comprtype &= 0xff;
+
switch (comprtype & 0xff) {
case JFFS2_COMPR_NONE:
/* This should be special-cased elsewhere, but we might as well deal with it */
@@ -208,7 +213,7 @@
return ret;
}
}
- printk(KERN_WARNING "JFFS2 compression type 0x%02x not avaiable.\n", comprtype);
+ printk(KERN_WARNING "JFFS2 compression type 0x%02x not available.\n", comprtype);
spin_unlock(&jffs2_compressor_list_lock);
return -EIO;
}
More information about the linux-mtd-cvs
mailing list