wok diff linux-libre/stuff/005-squashfs-add-xz-compression-configuration-option.patch @ rev 15230
gst-plugins-base, gst-plugins-bad: remove wrong error trigger
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 22 18:47:20 2013 +0200 (2013-09-22) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/linux-libre/stuff/005-squashfs-add-xz-compression-configuration-option.patch Sun Sep 22 18:47:20 2013 +0200 1.3 @@ -0,0 +1,86 @@ 1.4 +From: Phillip Lougher <phillip@lougher.demon.co.uk> 1.5 +Date: Thu, 9 Dec 2010 02:08:31 +0000 (+0000) 1.6 +Subject: Squashfs: Add XZ compression configuration option 1.7 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fpkl%2Fsquashfs-xz.git;a=commitdiff_plain;h=e23d468968e608de27328888240de27d7582ad52 1.8 + 1.9 +Squashfs: Add XZ compression configuration option 1.10 + 1.11 +Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk> 1.12 +--- 1.13 + 1.14 +diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig 1.15 +index e5f63da..e96d99a 100644 1.16 +--- a/fs/squashfs/Kconfig 1.17 ++++ b/fs/squashfs/Kconfig 1.18 +@@ -53,6 +53,22 @@ config SQUASHFS_LZO 1.19 + 1.20 + If unsure, say N. 1.21 + 1.22 ++config SQUASHFS_XZ 1.23 ++ bool "Include support for XZ compressed file systems" 1.24 ++ depends on SQUASHFS 1.25 ++ default n 1.26 ++ select XZ_DEC 1.27 ++ help 1.28 ++ Saying Y here includes support for reading Squashfs file systems 1.29 ++ compressed with XZ compresssion. XZ gives better compression than 1.30 ++ the default zlib compression, at the expense of greater CPU and 1.31 ++ memory overhead. 1.32 ++ 1.33 ++ XZ is not the standard compression used in Squashfs and so most 1.34 ++ file systems will be readable without selecting this option. 1.35 ++ 1.36 ++ If unsure, say N. 1.37 ++ 1.38 + config SQUASHFS_EMBEDDED 1.39 + bool "Additional option for memory-constrained systems" 1.40 + depends on SQUASHFS 1.41 +diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile 1.42 +index 7672bac..cecf2be 100644 1.43 +--- a/fs/squashfs/Makefile 1.44 ++++ b/fs/squashfs/Makefile 1.45 +@@ -7,3 +7,4 @@ squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o 1.46 + squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o 1.47 + squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o 1.48 + squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o 1.49 ++squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o 1.50 +diff --git a/fs/squashfs/decompressor.c b/fs/squashfs/decompressor.c 1.51 +index 24af9ce..ac333b8 100644 1.52 +--- a/fs/squashfs/decompressor.c 1.53 ++++ b/fs/squashfs/decompressor.c 1.54 +@@ -46,6 +46,12 @@ static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = { 1.55 + }; 1.56 + #endif 1.57 + 1.58 ++#ifndef CONFIG_SQUASHFS_XZ 1.59 ++static const struct squashfs_decompressor squashfs_xz_unsupported_comp_ops = { 1.60 ++ NULL, NULL, NULL, XZ_COMPRESSION, "xz", 0 1.61 ++}; 1.62 ++#endif 1.63 ++ 1.64 + static const struct squashfs_decompressor squashfs_unknown_comp_ops = { 1.65 + NULL, NULL, NULL, 0, "unknown", 0 1.66 + }; 1.67 +@@ -58,6 +64,11 @@ static const struct squashfs_decompressor *decompressor[] = { 1.68 + #else 1.69 + &squashfs_lzo_unsupported_comp_ops, 1.70 + #endif 1.71 ++#ifdef CONFIG_SQUASHFS_XZ 1.72 ++ &squashfs_xz_comp_ops, 1.73 ++#else 1.74 ++ &squashfs_xz_unsupported_comp_ops, 1.75 ++#endif 1.76 + &squashfs_unknown_comp_ops 1.77 + }; 1.78 + 1.79 +diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h 1.80 +index 5d45569..1096e2e 100644 1.81 +--- a/fs/squashfs/squashfs.h 1.82 ++++ b/fs/squashfs/squashfs.h 1.83 +@@ -107,3 +107,6 @@ extern const struct squashfs_decompressor squashfs_zlib_comp_ops; 1.84 + 1.85 + /* lzo_wrapper.c */ 1.86 + extern const struct squashfs_decompressor squashfs_lzo_comp_ops; 1.87 ++ 1.88 ++/* xz_wrapper.c */ 1.89 ++extern const struct squashfs_decompressor squashfs_xz_comp_ops;