1 From 1885ca0a1973944684f252094a703b7c80dfc974 Mon Sep 17 00:00:00 2001
2 From: Phillip Lougher <phillip@lougher.demon.co.uk>
3 Date: Wed, 14 Oct 2009 03:58:11 +0100
4 Subject: [PATCH] Squashfs: add decompressor entries for lzma and lzo
6 Add knowledge of lzma/lzo compression formats to the decompressor
7 framework. For now these are added as unsupported. Without
8 these entries lzma/lzo compressed filesystems will be flagged as
9 having unknown compression which is undesirable.
11 Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
13 fs/squashfs/decompressor.c | 10 ++++++++++
14 fs/squashfs/squashfs_fs.h | 4 +++-
15 2 files changed, 13 insertions(+), 1 deletions(-)
17 --- a/fs/squashfs/decompressor.c
18 +++ b/fs/squashfs/decompressor.c
20 * Squashfs, allowing multiple decompressors to be easily supported
23 +static const struct squashfs_decompressor squashfs_lzma_unsupported_comp_ops = {
24 + NULL, NULL, NULL, LZMA_COMPRESSION, "lzma", 0
27 +static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = {
28 + NULL, NULL, NULL, LZO_COMPRESSION, "lzo", 0
31 static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
32 NULL, NULL, NULL, 0, "unknown", 0
35 static const struct squashfs_decompressor *decompressor[] = {
36 &squashfs_zlib_comp_ops,
37 + &squashfs_lzma_unsupported_comp_ops,
38 + &squashfs_lzo_unsupported_comp_ops,
39 &squashfs_unknown_comp_ops
42 --- a/fs/squashfs/squashfs_fs.h
43 +++ b/fs/squashfs/squashfs_fs.h
44 @@ -211,7 +211,9 @@ struct meta_index {
46 * definitions for structures on disk
48 -#define ZLIB_COMPRESSION 1
49 +#define ZLIB_COMPRESSION 1
50 +#define LZMA_COMPRESSION 2
51 +#define LZO_COMPRESSION 3
53 struct squashfs_super_block {