Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231533
b: refs/heads/master
c: 7a43ae5
h: refs/heads/master
i:
  231531: 454cd23
v: v3
  • Loading branch information
Phillip Lougher committed Jan 13, 2011
1 parent 25c3b7c commit 703081d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81bb8debd0d570dc67dc1e9d8b612632cb941893
refs/heads/master: 7a43ae523744c01b6187013e781f44c2281c579c
15 changes: 15 additions & 0 deletions trunk/fs/squashfs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ config SQUASHFS_LZO

If unsure, say N.

config SQUASHFS_XZ
bool "Include support for XZ compressed file systems"
depends on SQUASHFS
select XZ_DEC
help
Saying Y here includes support for reading Squashfs file systems
compressed with XZ compresssion. XZ gives better compression than
the default zlib compression, at the expense of greater CPU and
memory overhead.

XZ is not the standard compression used in Squashfs and so most
file systems will be readable without selecting this option.

If unsure, say N.

config SQUASHFS_EMBEDDED
bool "Additional option for memory-constrained systems"
depends on SQUASHFS
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/squashfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ 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-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o
squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o
squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o
7 changes: 7 additions & 0 deletions trunk/fs/squashfs/decompressor.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ static const struct squashfs_decompressor squashfs_lzo_unsupported_comp_ops = {
};
#endif

#ifndef CONFIG_SQUASHFS_XZ
static const struct squashfs_decompressor squashfs_xz_comp_ops = {
NULL, NULL, NULL, XZ_COMPRESSION, "xz", 0
};
#endif

static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
NULL, NULL, NULL, 0, "unknown", 0
};
Expand All @@ -58,6 +64,7 @@ static const struct squashfs_decompressor *decompressor[] = {
#else
&squashfs_lzo_unsupported_comp_ops,
#endif
&squashfs_xz_comp_ops,
&squashfs_unknown_comp_ops
};

Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/squashfs/decompressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ static inline int squashfs_decompress(struct squashfs_sb_info *msblk,
return msblk->decompressor->decompress(msblk, buffer, bh, b, offset,
length, srclength, pages);
}

#ifdef CONFIG_SQUASHFS_XZ
extern const struct squashfs_decompressor squashfs_xz_comp_ops;
#endif

#endif

0 comments on commit 703081d

Please sign in to comment.