summaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/patches-2.6.32/004-squashfs_add_decompressor_lzma_lzo.patch
diff options
context:
space:
mode:
authorkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-03 10:49:27 +0000
committerkaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-03 10:49:27 +0000
commit5f33b429e2ec7a5aa0f78cb1d96e22778c6ea5c3 (patch)
tree632d6b87886f34dd23c8563f4abb2ffe58236ff5 /target/linux/generic-2.6/patches-2.6.32/004-squashfs_add_decompressor_lzma_lzo.patch
parentea913739e983d46b6e57114ce74b2e6efa693eeb (diff)
add preliminary 2.6.32 support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18283 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.32/004-squashfs_add_decompressor_lzma_lzo.patch')
-rw-r--r--target/linux/generic-2.6/patches-2.6.32/004-squashfs_add_decompressor_lzma_lzo.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.32/004-squashfs_add_decompressor_lzma_lzo.patch b/target/linux/generic-2.6/patches-2.6.32/004-squashfs_add_decompressor_lzma_lzo.patch
new file mode 100644
index 000000000..a378c0005
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.32/004-squashfs_add_decompressor_lzma_lzo.patch
@@ -0,0 +1,54 @@
+From 1885ca0a1973944684f252094a703b7c80dfc974 Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <phillip@lougher.demon.co.uk>
+Date: Wed, 14 Oct 2009 03:58:11 +0100
+Subject: [PATCH] Squashfs: add decompressor entries for lzma and lzo
+
+Add knowledge of lzma/lzo compression formats to the decompressor
+framework. For now these are added as unsupported. Without
+these entries lzma/lzo compressed filesystems will be flagged as
+having unknown compression which is undesirable.
+
+Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
+---
+ fs/squashfs/decompressor.c | 10 ++++++++++
+ fs/squashfs/squashfs_fs.h | 4 +++-
+ 2 files changed, 13 insertions(+), 1 deletions(-)
+
+--- a/fs/squashfs/decompressor.c
++++ b/fs/squashfs/decompressor.c
+@@ -36,12 +36,22 @@
+ * Squashfs, allowing multiple decompressors to be easily supported
+ */
+
++static const struct squashfs_decompressor squashfs_lzma_unsupported_comp_ops = {
++ NULL, NULL, NULL, LZMA_COMPRESSION, "lzma", 0
++};
++
++static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = {
++ NULL, NULL, NULL, LZO_COMPRESSION, "lzo", 0
++};
++
+ static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
+ NULL, NULL, NULL, 0, "unknown", 0
+ };
+
+ static const struct squashfs_decompressor *decompressor[] = {
+ &squashfs_zlib_comp_ops,
++ &squashfs_lzma_unsupported_comp_ops,
++ &squashfs_lzo_unsupported_comp_ops,
+ &squashfs_unknown_comp_ops
+ };
+
+--- a/fs/squashfs/squashfs_fs.h
++++ b/fs/squashfs/squashfs_fs.h
+@@ -211,7 +211,9 @@ struct meta_index {
+ /*
+ * definitions for structures on disk
+ */
+-#define ZLIB_COMPRESSION 1
++#define ZLIB_COMPRESSION 1
++#define LZMA_COMPRESSION 2
++#define LZO_COMPRESSION 3
+
+ struct squashfs_super_block {
+ __le32 s_magic;