tag 391846 + patch
thanks

I'm attaching a patch for this bug.  I've tested that, with this patch,
the shfs kernel modules build fine on both 2.6.17 and 2.6.18 kernels.

I'm not NMUing right now, as the maintainer was thinking about having
the package removed from the archive.

Bas.

-- 
+--------------------------------------------------------------------+
| Bas Zoetekouw              | GPG key: 0644fab7                     |
|----------------------------| Fingerprint: c1f5 f24c d514 3fec 8bf6 |
| [EMAIL PROTECTED], [EMAIL PROTECTED] |              a2b1 2bae e41f 0644 fab7 |
+--------------------------------------------------------------------+ 
diff -Naubr shfs-0.35.eerst/debian/changelog shfs-0.35/debian/changelog
--- shfs-0.35.eerst/debian/changelog    2006-10-16 15:24:27.000000000 +0200
+++ shfs-0.35/debian/changelog  2006-10-16 15:28:54.093057217 +0200
@@ -1,3 +1,11 @@
+shfs (0.35-6.1) unstable; urgency=medium
+
+  * Non-Maintainer upload
+  * Added debian/patches/fix_2.6.18.dpatch to make the module compile with
+    2.6.18 kernels. (closes: #391846)
+
+ -- Bas Zoetekouw <[EMAIL PROTECTED]>  Mon, 16 Oct 2006 15:27:45 +0200
+
 shfs (0.35-6) unstable; urgency=low
 
   * dropped the dpkg-statoverride hints, using debconf now (closes: #322587)
diff -Naubr shfs-0.35.eerst/debian/patches/00list 
shfs-0.35/debian/patches/00list
--- shfs-0.35.eerst/debian/patches/00list       2006-10-16 15:24:27.000000000 
+0200
+++ shfs-0.35/debian/patches/00list     2006-10-16 15:42:28.841185510 +0200
@@ -2,3 +2,4 @@
 shell-test-verbosity
 prepatches
 truncate_inode_2.6.14
+fix_2.6.18
diff -Naubr shfs-0.35.eerst/debian/patches/fix_2.6.18.dpatch 
shfs-0.35/debian/patches/fix_2.6.18.dpatch
--- shfs-0.35.eerst/debian/patches/fix_2.6.18.dpatch    1970-01-01 
01:00:00.000000000 +0100
+++ shfs-0.35/debian/patches/fix_2.6.18.dpatch  2006-10-16 15:51:57.150437573 
+0200
@@ -0,0 +1,82 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##  by Bas Zoetekouw <[EMAIL PROTECTED]>
+##  based on code from 
http://www.mail-archive.com/pld-cvs-commit%40lists.pld-linux.org/msg67239.html
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description
+
[EMAIL PROTECTED]@
+
+--- Linux-2.6/shfs.h.eerst      2006-10-16 15:50:06.461722871 +0200
++++ Linux-2.6/shfs.h    2006-10-16 15:50:08.686375467 +0200
+@@ -23,6 +23,7 @@
+ #define SHFS_PATH_MAX 512
+
+ #include <linux/types.h>
++#include <linux/version.h>
+
+ struct shfs_fattr {
+        unsigned long   f_ino;
+--- shfs-0.35/shfs/Linux-2.6/inode.c.eerst     2006-10-16 15:13:19.996908300 
+0200
++++ shfs-0.35/shfs/Linux-2.6/inode.c   2006-10-16 15:19:50.654269651 +0200
+@@ -341,12 +341,21 @@
+       return -EINVAL;
+ }
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18))
++static struct super_block *
++shfs_get_sb(struct file_system_type *fs_type,
++          int flags, const char *dev_name, void *data, struct vfsmount *mnt)
++{
++      return get_sb_nodev(fs_type, flags, data, shfs_read_super, mnt);
++}
++#else /* older (<2.6.18) kernels */
+ static struct super_block *
+ shfs_get_sb(struct file_system_type *fs_type,
+           int flags, const char *dev_name, void *data)
+ {
+       return get_sb_nodev(fs_type, flags, data, shfs_read_super);
+ }
++#endif
+ 
+ static struct file_system_type sh_fs_type = {
+       .owner          = THIS_MODULE,
+--- shfs-0.35/shfs/Linux-2.6/proc.c.eerst      2006-10-16 15:19:58.537107068 
+0200
++++ shfs-0.35/shfs/Linux-2.6/proc.c    2006-10-16 15:21:18.373236170 +0200
+@@ -570,6 +570,16 @@
+       return result;
+ }
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18))
++int
++shfs_statfs(struct dentry *dentry, struct kstatfs *attr)
++{
++      struct shfs_sb_info *info = info_from_dentry(dentry);
++
++      DEBUG("\n");
++      return info->fops.statfs(info, attr);
++}
++#else /* older (<2.6.18) kernels */
+ int
+ shfs_statfs(struct super_block *sb, struct kstatfs *attr)
+ {
+@@ -578,4 +588,4 @@
+       DEBUG("\n");
+       return info->fops.statfs(info, attr);
+ }
+-
++#endif
+--- shfs-0.35/shfs/Linux-2.6/shfs_fs.h.eerst   2006-10-16 15:21:35.370687631 
+0200
++++ shfs-0.35/shfs/Linux-2.6/shfs_fs.h 2006-10-16 15:22:35.117676133 +0200
+@@ -100,7 +100,11 @@
+ void set_garbage(struct shfs_sb_info *info, int write, int count);
+ int get_name(struct dentry *d, char *name);
+ int shfs_notify_change(struct dentry *dentry, struct iattr *attr);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18))
++int shfs_statfs(struct dentry *dentry, struct kstatfs *attr);
++#else 
+ int shfs_statfs(struct super_block *sb, struct kstatfs *attr);
++#endif
+       
+ /* shfs/inode.c */
+ void shfs_set_inode_attr(struct inode *inode, struct shfs_fattr *fattr);

Reply via email to