SOURCES: linux-2.4-squashfs.patch - adjusted for PLD kernel, added...

qboosh qboosh at pld-linux.org
Wed Aug 30 16:30:17 CEST 2006


Author: qboosh                       Date: Wed Aug 30 14:30:17 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- adjusted for PLD kernel, added ugly hacks for <linux/zlib.h> inclusion

---- Files affected:
SOURCES:
   linux-2.4-squashfs.patch (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.4-squashfs.patch
diff -u SOURCES/linux-2.4-squashfs.patch:1.3 SOURCES/linux-2.4-squashfs.patch:1.4
--- SOURCES/linux-2.4-squashfs.patch:1.3	Wed Aug 30 14:16:58 2006
+++ SOURCES/linux-2.4-squashfs.patch	Wed Aug 30 16:30:12 2006
@@ -2922,23 +2922,23 @@
 diff --new-file -urp linux-2.4.33/include/linux/fs.h linux-2.4.33-squashfs3.1/include/linux/fs.h
 --- linux-2.4.33/include/linux/fs.h	2005-04-04 02:42:20.000000000 +0100
 +++ linux-2.4.33-squashfs3.1/include/linux/fs.h	2006-08-13 00:12:59.000000000 +0100
-@@ -324,6 +324,7 @@ extern void set_bh_page(struct buffer_he
- #include <linux/usbdev_fs_i.h>
+@@ -328,6 +328,7 @@ extern void set_bh_page(struct buffer_he
+ #include <linux/hppfs_fs_i.h>
  #include <linux/jffs2_fs_i.h>
  #include <linux/cramfs_fs_sb.h>
 +#include <linux/squashfs_fs_i.h>
  
  /*
   * Attribute flags.  These should be or-ed together to figure out what
-@@ -519,6 +520,7 @@ struct inode {
- 		struct socket			socket_i;
- 		struct usbdev_inode_info        usbdev_i;
- 		struct jffs2_inode_info		jffs2_i;
+@@ -525,6 +526,7 @@ struct inode {
+ 	        struct hostfs_inode_info	hostfs_i;
+ 	        struct hppfs_inode_info		hppfs_i;
+  		struct jffs2_inode_info		jffs2_i;
 +		struct squashfs_inode_info	squashfs_i;
  		void				*generic_ip;
  	} u;
  };
-@@ -734,6 +736,7 @@ struct nameidata {
+@@ -739,6 +741,7 @@ struct nameidata {
  #include <linux/usbdev_fs_sb.h>
  #include <linux/cramfs_fs_sb.h>
  #include <linux/jffs2_fs_sb.h>
@@ -2946,7 +2946,7 @@
  
  extern struct list_head super_blocks;
  extern spinlock_t sb_lock;
-@@ -793,6 +796,7 @@ struct super_block {
+@@ -797,6 +800,7 @@ struct super_block {
  		struct usbdev_sb_info   usbdevfs_sb;
  		struct jffs2_sb_info	jffs2_sb;
  		struct cramfs_sb_info	cramfs_sb;
@@ -4074,3 +4074,90 @@
         "$CONFIG_PPP_DEFLATE" = "m" -o \
         "$CONFIG_CRYPTO_DEFLATE" = "m" -o \
         "$CONFIG_JFFS2_FS" = "m" -o \
+UGLY HACK for <linux/zlib.h> vs rest of code conflict
+--- linux-2.4.33/include/linux/squashfs_fs_sb.h.orig	2006-08-28 14:41:38.855971000 +0200
++++ linux-2.4.33/include/linux/squashfs_fs_sb.h	2006-08-28 16:07:58.415971000 +0200
+@@ -24,7 +24,35 @@
+  */
+ 
+ #include <linux/squashfs_fs.h>
+-#include <linux/zlib.h>
++
++/* including <linux/zlib.h> here breaks too much in other places of kernel code */
++#ifndef IN_SQUASHFS
++#  ifndef FAR
++#    define FAR
++#  endif
++typedef unsigned char Bytef_;
++typedef unsigned int  uInt_;
++typedef unsigned long uLong_;
++
++typedef struct z_stream_s_ {
++    Bytef_   *next_in;  /* next input byte */
++    uInt_    avail_in;  /* number of bytes available at next_in */
++    uLong_   total_in;  /* total nb of input bytes read so far */
++
++    Bytef_   *next_out; /* next output byte should be put there */
++    uInt_    avail_out; /* remaining free space at next_out */
++    uLong_   total_out; /* total nb of bytes output so far */
++
++    char     *msg;      /* last error message, NULL if no error */
++    struct internal_state *state; /* not visible by applications */
++
++    void     *workspace; /* memory allocated for this stream */
++
++    int     data_type;  /* best guess about the data type: ascii or binary */
++    uLong_  adler;      /* adler32 value of the uncompressed data */
++    uLong_  reserved;   /* reserved for future use */
++} z_stream_;
++#endif
+ 
+ struct squashfs_cache {
+ 	long long	block;
+@@ -93,7 +93,11 @@
+ 	wait_queue_head_t	waitq;
+ 	wait_queue_head_t	fragment_wait_queue;
+ 	struct meta_index	*meta_index;
++#ifdef IN_SQUASHFS
+ 	z_stream		stream;
++#else
++	z_stream_		stream;
++#endif
+ 	struct inode		*(*iget)(struct super_block *s,  squashfs_inode_t
+ 				inode);
+ 	long long		(*read_blocklist)(struct inode *inode, int
+--- linux-2.4.33/fs/squashfs/inode.c.orig	2006-08-28 16:10:13.935971000 +0200
++++ linux-2.4.33/fs/squashfs/inode.c	2006-08-28 16:33:28.535971000 +0200
+@@ -22,11 +22,12 @@
+  */
+ 
+ #include <linux/types.h>
++#define IN_SQUASHFS
++#include <linux/zlib.h>
+ #include <linux/squashfs_fs.h>
+ #include <linux/module.h>
+ #include <linux/errno.h>
+ #include <linux/slab.h>
+-#include <linux/zlib.h>
+ #include <linux/fs.h>
+ #include <linux/smp_lock.h>
+ #include <linux/locks.h>
+--- linux-2.4.33/fs/squashfs/squashfs2_0.c.orig	2006-08-28 16:10:13.945971000 +0200
++++ linux-2.4.33/fs/squashfs/squashfs2_0.c	2006-08-28 16:33:36.305971000 +0200
+@@ -22,6 +22,8 @@
+  */
+ 
+ #include <linux/types.h>
++#define IN_SQUASHFS
++#include <linux/zlib.h>
+ #include <linux/squashfs_fs.h>
+ #include <linux/module.h>
+ #include <linux/errno.h>
+@@ -33,7 +34,6 @@
+ #include <linux/init.h>
+ #include <linux/dcache.h>
+ #include <linux/wait.h>
+-#include <linux/zlib.h>
+ #include <linux/blkdev.h>
+ #include <linux/vmalloc.h>
+ #include <asm/uaccess.h>
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/linux-2.4-squashfs.patch?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list