From 93356e63258fe6fe9417d080f723df7c4c84f53f Mon Sep 17 00:00:00 2001 From: Phillip Lougher Date: Fri, 22 Jul 2011 03:01:28 +0100 Subject: [PATCH] --- yaml --- r: 259063 b: refs/heads/master c: cc6d3497141adedb71de8ddce62bf4cd4817832d h: refs/heads/master i: 259061: 616ce5f74af109a1fa9d2ce1461e46e6c2c30881 259059: 5737c983681bd7aadbf8c6c2f092770c6c73326a 259055: fb7b98d17be51dd38d49e34f35c3e8afb4869b19 v: v3 --- [refs] | 2 +- trunk/fs/squashfs/Kconfig | 14 +++++++++++++- trunk/fs/squashfs/Makefile | 3 ++- trunk/fs/squashfs/decompressor.c | 6 ++++++ trunk/fs/squashfs/decompressor.h | 4 ++++ trunk/fs/squashfs/squashfs.h | 3 --- 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 6a87e76f8968..63b47933e736 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 812753d66f5a45e59a9e0904c77a661c2410a3b4 +refs/heads/master: cc6d3497141adedb71de8ddce62bf4cd4817832d diff --git a/trunk/fs/squashfs/Kconfig b/trunk/fs/squashfs/Kconfig index 7797218d0b30..1360d4f88f41 100644 --- a/trunk/fs/squashfs/Kconfig +++ b/trunk/fs/squashfs/Kconfig @@ -1,7 +1,6 @@ config SQUASHFS tristate "SquashFS 4.0 - Squashed file system support" depends on BLOCK - select ZLIB_INFLATE help Saying Y here includes support for SquashFS 4.0 (a Compressed Read-Only File System). Squashfs is a highly compressed read-only @@ -36,6 +35,19 @@ config SQUASHFS_XATTR If unsure, say N. +config SQUASHFS_ZLIB + bool "Include support for ZLIB compressed file systems" + depends on SQUASHFS + select ZLIB_INFLATE + default y + help + ZLIB compression is the standard compression used by Squashfs + file systems. It offers a good trade-off between compression + achieved and the amount of CPU time and memory necessary to + compress and decompress. + + If unsure, say Y. + config SQUASHFS_LZO bool "Include support for LZO compressed file systems" depends on SQUASHFS diff --git a/trunk/fs/squashfs/Makefile b/trunk/fs/squashfs/Makefile index cecf2bea07af..110b0476f3b4 100644 --- a/trunk/fs/squashfs/Makefile +++ b/trunk/fs/squashfs/Makefile @@ -4,7 +4,8 @@ obj-$(CONFIG_SQUASHFS) += squashfs.o squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o -squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o +squashfs-y += namei.o super.o symlink.o decompressor.o squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o +squashfs-$(CONFIG_SQUASHFS_ZLIB) += zlib_wrapper.o diff --git a/trunk/fs/squashfs/decompressor.c b/trunk/fs/squashfs/decompressor.c index 9f1b0bb96f13..3f6271d86abc 100644 --- a/trunk/fs/squashfs/decompressor.c +++ b/trunk/fs/squashfs/decompressor.c @@ -52,6 +52,12 @@ static const struct squashfs_decompressor squashfs_xz_comp_ops = { }; #endif +#ifndef CONFIG_SQUASHFS_ZLIB +static const struct squashfs_decompressor squashfs_zlib_comp_ops = { + NULL, NULL, NULL, ZLIB_COMPRESSION, "zlib", 0 +}; +#endif + static const struct squashfs_decompressor squashfs_unknown_comp_ops = { NULL, NULL, NULL, 0, "unknown", 0 }; diff --git a/trunk/fs/squashfs/decompressor.h b/trunk/fs/squashfs/decompressor.h index 8ba70cff09a6..330073e29029 100644 --- a/trunk/fs/squashfs/decompressor.h +++ b/trunk/fs/squashfs/decompressor.h @@ -56,4 +56,8 @@ extern const struct squashfs_decompressor squashfs_xz_comp_ops; extern const struct squashfs_decompressor squashfs_lzo_comp_ops; #endif +#ifdef CONFIG_SQUASHFS_ZLIB +extern const struct squashfs_decompressor squashfs_zlib_comp_ops; +#endif + #endif diff --git a/trunk/fs/squashfs/squashfs.h b/trunk/fs/squashfs/squashfs.h index e3be6a71cfa7..d1266516ed08 100644 --- a/trunk/fs/squashfs/squashfs.h +++ b/trunk/fs/squashfs/squashfs.h @@ -97,6 +97,3 @@ extern const struct inode_operations squashfs_symlink_inode_ops; /* xattr.c */ extern const struct xattr_handler *squashfs_xattr_handlers[]; - -/* zlib_wrapper.c */ -extern const struct squashfs_decompressor squashfs_zlib_comp_ops;