rev |
line source |
slaxemulator@7650
|
1 From: Phillip Lougher <phillip@lougher.demon.co.uk>
|
slaxemulator@7650
|
2 Date: Thu, 9 Dec 2010 02:08:31 +0000 (+0000)
|
slaxemulator@7650
|
3 Subject: Squashfs: Add XZ compression configuration option
|
slaxemulator@7650
|
4 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fpkl%2Fsquashfs-xz.git;a=commitdiff_plain;h=e23d468968e608de27328888240de27d7582ad52
|
slaxemulator@7650
|
5
|
slaxemulator@7650
|
6 Squashfs: Add XZ compression configuration option
|
slaxemulator@7650
|
7
|
slaxemulator@7650
|
8 Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
|
slaxemulator@7650
|
9 ---
|
slaxemulator@7650
|
10
|
slaxemulator@7650
|
11 diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig
|
slaxemulator@7650
|
12 index e5f63da..e96d99a 100644
|
slaxemulator@7650
|
13 --- a/fs/squashfs/Kconfig
|
slaxemulator@7650
|
14 +++ b/fs/squashfs/Kconfig
|
slaxemulator@7650
|
15 @@ -53,6 +53,22 @@ config SQUASHFS_LZO
|
slaxemulator@7650
|
16
|
slaxemulator@7650
|
17 If unsure, say N.
|
slaxemulator@7650
|
18
|
slaxemulator@7650
|
19 +config SQUASHFS_XZ
|
slaxemulator@7650
|
20 + bool "Include support for XZ compressed file systems"
|
slaxemulator@7650
|
21 + depends on SQUASHFS
|
slaxemulator@7650
|
22 + default n
|
slaxemulator@7650
|
23 + select XZ_DEC
|
slaxemulator@7650
|
24 + help
|
slaxemulator@7650
|
25 + Saying Y here includes support for reading Squashfs file systems
|
slaxemulator@7650
|
26 + compressed with XZ compresssion. XZ gives better compression than
|
slaxemulator@7650
|
27 + the default zlib compression, at the expense of greater CPU and
|
slaxemulator@7650
|
28 + memory overhead.
|
slaxemulator@7650
|
29 +
|
slaxemulator@7650
|
30 + XZ is not the standard compression used in Squashfs and so most
|
slaxemulator@7650
|
31 + file systems will be readable without selecting this option.
|
slaxemulator@7650
|
32 +
|
slaxemulator@7650
|
33 + If unsure, say N.
|
slaxemulator@7650
|
34 +
|
slaxemulator@7650
|
35 config SQUASHFS_EMBEDDED
|
slaxemulator@7650
|
36 bool "Additional option for memory-constrained systems"
|
slaxemulator@7650
|
37 depends on SQUASHFS
|
slaxemulator@7650
|
38 diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile
|
slaxemulator@7650
|
39 index 7672bac..cecf2be 100644
|
slaxemulator@7650
|
40 --- a/fs/squashfs/Makefile
|
slaxemulator@7650
|
41 +++ b/fs/squashfs/Makefile
|
slaxemulator@7650
|
42 @@ -7,3 +7,4 @@ squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
|
slaxemulator@7650
|
43 squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o
|
slaxemulator@7650
|
44 squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o
|
slaxemulator@7650
|
45 squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o
|
slaxemulator@7650
|
46 +squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o
|
slaxemulator@7650
|
47 diff --git a/fs/squashfs/decompressor.c b/fs/squashfs/decompressor.c
|
slaxemulator@7650
|
48 index 24af9ce..ac333b8 100644
|
slaxemulator@7650
|
49 --- a/fs/squashfs/decompressor.c
|
slaxemulator@7650
|
50 +++ b/fs/squashfs/decompressor.c
|
slaxemulator@7650
|
51 @@ -46,6 +46,12 @@ static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = {
|
slaxemulator@7650
|
52 };
|
slaxemulator@7650
|
53 #endif
|
slaxemulator@7650
|
54
|
slaxemulator@7650
|
55 +#ifndef CONFIG_SQUASHFS_XZ
|
slaxemulator@7650
|
56 +static const struct squashfs_decompressor squashfs_xz_unsupported_comp_ops = {
|
slaxemulator@7650
|
57 + NULL, NULL, NULL, XZ_COMPRESSION, "xz", 0
|
slaxemulator@7650
|
58 +};
|
slaxemulator@7650
|
59 +#endif
|
slaxemulator@7650
|
60 +
|
slaxemulator@7650
|
61 static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
|
slaxemulator@7650
|
62 NULL, NULL, NULL, 0, "unknown", 0
|
slaxemulator@7650
|
63 };
|
slaxemulator@7650
|
64 @@ -58,6 +64,11 @@ static const struct squashfs_decompressor *decompressor[] = {
|
slaxemulator@7650
|
65 #else
|
slaxemulator@7650
|
66 &squashfs_lzo_unsupported_comp_ops,
|
slaxemulator@7650
|
67 #endif
|
slaxemulator@7650
|
68 +#ifdef CONFIG_SQUASHFS_XZ
|
slaxemulator@7650
|
69 + &squashfs_xz_comp_ops,
|
slaxemulator@7650
|
70 +#else
|
slaxemulator@7650
|
71 + &squashfs_xz_unsupported_comp_ops,
|
slaxemulator@7650
|
72 +#endif
|
slaxemulator@7650
|
73 &squashfs_unknown_comp_ops
|
slaxemulator@7650
|
74 };
|
slaxemulator@7650
|
75
|
slaxemulator@7650
|
76 diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h
|
slaxemulator@7650
|
77 index 5d45569..1096e2e 100644
|
slaxemulator@7650
|
78 --- a/fs/squashfs/squashfs.h
|
slaxemulator@7650
|
79 +++ b/fs/squashfs/squashfs.h
|
slaxemulator@7650
|
80 @@ -107,3 +107,6 @@ extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
|
slaxemulator@7650
|
81
|
slaxemulator@7650
|
82 /* lzo_wrapper.c */
|
slaxemulator@7650
|
83 extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
|
slaxemulator@7650
|
84 +
|
slaxemulator@7650
|
85 +/* xz_wrapper.c */
|
slaxemulator@7650
|
86 +extern const struct squashfs_decompressor squashfs_xz_comp_ops;
|