diff options
author | Phillip Lougher <phillip@lougher.demon.co.uk> | 2011-02-27 20:45:42 -0500 |
---|---|---|
committer | Phillip Lougher <phillip@lougher.demon.co.uk> | 2011-02-28 13:21:59 -0500 |
commit | b7fc0ff09d24b372dc04b0c02b80659c0a66fdfe (patch) | |
tree | 9cd9a94c3b07ef8064e1952a376d964776aa4571 /fs/squashfs/xz_wrapper.c | |
parent | 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (diff) |
Squashfs: extend decompressor framework to handle compression options
Extend decompressor framework to handle compression options stored in
the filesystem. These options can be used by the relevant decompressor
at initialisation time to over-ride defaults.
The presence of compression options in the filesystem is indicated by
the COMP_OPT filesystem flag. If present the data is read from the
filesystem and passed to the decompressor init function. The decompressor
init function signature has been extended to take this data.
Also update the init function signature in the glib, lzo and xz
decompressor wrappers.
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Diffstat (limited to 'fs/squashfs/xz_wrapper.c')
-rw-r--r-- | fs/squashfs/xz_wrapper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/squashfs/xz_wrapper.c b/fs/squashfs/xz_wrapper.c index c4eb40018256..397adea72eb9 100644 --- a/fs/squashfs/xz_wrapper.c +++ b/fs/squashfs/xz_wrapper.c | |||
@@ -38,7 +38,8 @@ struct squashfs_xz { | |||
38 | struct xz_buf buf; | 38 | struct xz_buf buf; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static void *squashfs_xz_init(struct squashfs_sb_info *msblk) | 41 | static void *squashfs_xz_init(struct squashfs_sb_info *msblk, void *buff, |
42 | int len) | ||
42 | { | 43 | { |
43 | int block_size = max_t(int, msblk->block_size, SQUASHFS_METADATA_SIZE); | 44 | int block_size = max_t(int, msblk->block_size, SQUASHFS_METADATA_SIZE); |
44 | 45 | ||
@@ -55,7 +56,7 @@ static void *squashfs_xz_init(struct squashfs_sb_info *msblk) | |||
55 | failed: | 56 | failed: |
56 | ERROR("Failed to allocate xz workspace\n"); | 57 | ERROR("Failed to allocate xz workspace\n"); |
57 | kfree(stream); | 58 | kfree(stream); |
58 | return NULL; | 59 | return ERR_PTR(-ENOMEM); |
59 | } | 60 | } |
60 | 61 | ||
61 | 62 | ||