005-squashfs_extra_parameter.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 5f393ede3ddb5dd4cc2a9f243182fac45f1ce10b Mon Sep 17 00:00:00 2001
  2. From: Phillip Lougher <[email protected]>
  3. Date: Wed, 14 Oct 2009 04:07:54 +0100
  4. Subject: [PATCH] Squashfs: add an extra parameter to the decompressor init function
  5. Signed-off-by: Phillip Lougher <[email protected]>
  6. ---
  7. fs/squashfs/decompressor.h | 4 ++--
  8. fs/squashfs/zlib_wrapper.c | 2 +-
  9. 2 files changed, 3 insertions(+), 3 deletions(-)
  10. --- a/fs/squashfs/decompressor.h
  11. +++ b/fs/squashfs/decompressor.h
  12. @@ -24,7 +24,7 @@
  13. */
  14. struct squashfs_decompressor {
  15. - void *(*init)(void);
  16. + void *(*init)(struct squashfs_sb_info *);
  17. void (*free)(void *);
  18. int (*decompress)(struct squashfs_sb_info *, void **,
  19. struct buffer_head **, int, int, int, int, int);
  20. @@ -35,7 +35,7 @@ struct squashfs_decompressor {
  21. static inline void *squashfs_decompressor_init(struct squashfs_sb_info *msblk)
  22. {
  23. - return msblk->decompressor->init();
  24. + return msblk->decompressor->init(msblk);
  25. }
  26. static inline void squashfs_decompressor_free(struct squashfs_sb_info *msblk,
  27. --- a/fs/squashfs/zlib_wrapper.c
  28. +++ b/fs/squashfs/zlib_wrapper.c
  29. @@ -32,7 +32,7 @@
  30. #include "squashfs.h"
  31. #include "decompressor.h"
  32. -static void *zlib_init(void)
  33. +static void *zlib_init(struct squashfs_sb_info *dummy)
  34. {
  35. z_stream *stream = kmalloc(sizeof(z_stream), GFP_KERNEL);
  36. if (stream == NULL)