mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
100b33c8bd
commit
b7fc0ff09d
8 changed files with 54 additions and 16 deletions
|
@ -32,7 +32,7 @@
|
|||
#include "squashfs.h"
|
||||
#include "decompressor.h"
|
||||
|
||||
static void *zlib_init(struct squashfs_sb_info *dummy)
|
||||
static void *zlib_init(struct squashfs_sb_info *dummy, void *buff, int len)
|
||||
{
|
||||
z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL);
|
||||
if (stream == NULL)
|
||||
|
@ -47,7 +47,7 @@ static void *zlib_init(struct squashfs_sb_info *dummy)
|
|||
failed:
|
||||
ERROR("Failed to allocate zlib workspace\n");
|
||||
kfree(stream);
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue