wok annotate linux-libre/stuff/005-squashfs-add-xz-compression-configuration-option.patch @ rev 23521

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