aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs/zlib_wrapper.c
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@lougher.demon.co.uk>2011-02-27 20:45:42 -0500
committerPhillip Lougher <phillip@lougher.demon.co.uk>2011-02-28 13:21:59 -0500
commitb7fc0ff09d24b372dc04b0c02b80659c0a66fdfe (patch)
tree9cd9a94c3b07ef8064e1952a376d964776aa4571 /fs/squashfs/zlib_wrapper.c
parent100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (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/zlib_wrapper.c')
-rw-r--r--fs/squashfs/zlib_wrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c
index 4661ae2b1cec..195b0d035e9b 100644
--- a/fs/squashfs/zlib_wrapper.c
+++ b/fs/squashfs/zlib_wrapper.c
@@ -32,7 +32,7 @@
32#include "squashfs.h" 32#include "squashfs.h"
33#include "decompressor.h" 33#include "decompressor.h"
34 34
35static void *zlib_init(struct squashfs_sb_info *dummy) 35static void *zlib_init(struct squashfs_sb_info *dummy, void *buff, int len)
36{ 36{
37 z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL); 37 z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL);
38 if (stream == NULL) 38 if (stream == NULL)
@@ -47,7 +47,7 @@ static void *zlib_init(struct squashfs_sb_info *dummy)
47failed: 47failed:
48 ERROR("Failed to allocate zlib workspace\n"); 48 ERROR("Failed to allocate zlib workspace\n");
49 kfree(stream); 49 kfree(stream);
50 return NULL; 50 return ERR_PTR(-ENOMEM);
51} 51}
52 52
53 53