]> git.pld-linux.org Git - packages/squashfs_lzma.git/commitdiff
- patch for build on kernel 2.6.25
authorzbyniu <zbyniu@pld-linux.org>
Wed, 14 May 2008 20:06:39 +0000 (20:06 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    squashfs_lzma-2.6.25.patch -> 1.1
    squashfs_lzma.spec -> 1.26

squashfs_lzma-2.6.25.patch [new file with mode: 0644]
squashfs_lzma.spec

diff --git a/squashfs_lzma-2.6.25.patch b/squashfs_lzma-2.6.25.patch
new file mode 100644 (file)
index 0000000..383f9a5
--- /dev/null
@@ -0,0 +1,77 @@
+diff -upr squashfs3.3./fs/squashfs/inode.c squashfs3.3../fs/squashfs/inode.c
+--- squashfs3.3./fs/squashfs/inode.c   2008-05-14 21:41:33.550246000 +0200
++++ squashfs3.3../fs/squashfs/inode.c  2008-05-14 22:03:40.959017242 +0200
+@@ -32,6 +32,7 @@
+ #include <linux/vmalloc.h>
+ #include <linux/smp_lock.h>
+ #include <linux/exportfs.h>
++#include <linux/version.h>
+ #include "squashfs.h"
+ #include "sqlzma.h"
+@@ -59,7 +60,9 @@ static DEFINE_PER_CPU(struct sqlzma *, s
+ int squashfs_cached_blks;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+ static void vfs_read_inode(struct inode *i);
++#endif
+ static struct dentry *squashfs_get_parent(struct dentry *child);
+ static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode);
+ static int squashfs_statfs(struct dentry *, struct kstatfs *);
+@@ -105,7 +108,9 @@ static struct super_operations squashfs_
+       .destroy_inode = squashfs_destroy_inode,
+       .statfs = squashfs_statfs,
+       .put_super = squashfs_put_super,
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+       .read_inode = vfs_read_inode
++#endif
+ };
+ static struct export_operations squashfs_export_ops = {
+@@ -665,7 +670,7 @@ out:
+       return SQUASHFS_INVALID_BLK;
+ }
+       
+-
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+ static void vfs_read_inode(struct inode *i)
+ {
+       struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
+@@ -676,12 +681,18 @@ static void vfs_read_inode(struct inode 
+       if(inode != SQUASHFS_INVALID_BLK)
+               (msblk->read_inode)(i, inode);
+ }
+-
++#endif
+ static struct dentry *squashfs_get_parent(struct dentry *child)
+ {
+       struct inode *i = child->d_inode;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+       struct inode *parent = iget(i->i_sb, SQUASHFS_I(i)->u.s2.parent_inode);
++#else
++      unsigned long ino = SQUASHFS_I(i)->u.s2.parent_inode;
++      squashfs_inode_t inode = squashfs_inode_lookup(i->i_sb, ino);
++      struct inode *parent;
++#endif
+       struct dentry *rv;
+       TRACE("Entered squashfs_get_parent\n");
+@@ -707,8 +718,14 @@ SQSH_EXTERN struct inode *squashfs_iget(
+       struct inode *i = iget_locked(s, inode_number);
+       TRACE("Entered squashfs_iget\n");
+-
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+       if(i && (i->i_state & I_NEW)) {
++#else
++      if (!i)
++              return ERR_PTR(-ENOMEM);
++
++      if (i->i_state & I_NEW) {
++#endif
+               (msblk->read_inode)(i, inode);
+               unlock_new_inode(i);
+       }
+Tylko w squashfs3.3../fs/squashfs: inode.c~
index 57ae349b8d31de7c15c9b3971389d0cb4e3c9f5a..f9ccf4b1362c53969c3113a264af6898c07aca0e 100644 (file)
@@ -27,6 +27,7 @@ Source2:      http://www.squashfs-lzma.org/dl/sqlzma%{version}-457.tar.bz2
 Patch0:                http://www.squashfs-lzma.org/dl/squashfs-cvsfix.patch
 #Patch1:       %{name}-not_zlib.patch
 #Patch2:       %{name}-magic.patch
+Patch3:                squashfs_lzma-2.6.25.patch
 URL:           http://www.squashfs-lzma.org/
 BuildRequires: patchutils
 %if %{with kernel}
@@ -106,6 +107,7 @@ ln -s ../../sqmagic.h fs/squashfs
 mv C/Compress/Lzma/kmod/* C/Compress/Lzma
 sed -i 's@../LzmaDecode.c@LzmaDecode.c@' C/Compress/Lzma/module.c
 ln -s ../../../sqlzma.h C/Compress/Lzma
+%patch3 -p1
 
 %build
 %if %{with userspace}
This page took 0.568531 seconds and 4 git commands to generate.