summaryrefslogtreecommitdiff
path: root/system/cdfs/cdfs-3.3.diff
diff options
context:
space:
mode:
Diffstat (limited to 'system/cdfs/cdfs-3.3.diff')
-rw-r--r--system/cdfs/cdfs-3.3.diff144
1 files changed, 144 insertions, 0 deletions
diff --git a/system/cdfs/cdfs-3.3.diff b/system/cdfs/cdfs-3.3.diff
new file mode 100644
index 0000000000..c73f6338b0
--- /dev/null
+++ b/system/cdfs/cdfs-3.3.diff
@@ -0,0 +1,144 @@
+---
+ Makefile | 14 +++++---------
+ cddata.c | 2 +-
+ proc.c | 6 +++---
+ root.c | 25 +++++++++++--------------
+ 4 files changed, 20 insertions(+), 27 deletions(-)
+
+Index: cdfs-2.6.27/Makefile
+===================================================================
+--- cdfs-2.6.27.orig/Makefile
++++ cdfs-2.6.27/Makefile
+@@ -1,18 +1,14 @@
+-ifneq ($(KERNELRELEASE),)
+ obj-m := cdfs.o
+ cdfs-objs := root.o audio.o cdXA.o cddata.o hfs.o iso.o proc.o root.o utils.o daemon.o discid.o toc.o
+
+-else
+ KDIR := /lib/modules/$(shell uname -r)/build
+ PWD := $(shell pwd)
+
+-all:
+- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+-
+-install:
+- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
+-endif
++all modules:
++ $(MAKE) -C $(KDIR) M=$(PWD) modules
+
++install modules_install:
++ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
+
+ clean:
+- -rm *.o *.ko .*.cmd *.mod.c *~
++ $(MAKE) -C $(KDIR) M=$(PWD) clean
+Index: cdfs-2.6.27/cddata.c
+===================================================================
+--- cdfs-2.6.27.orig/cddata.c
++++ cdfs-2.6.27/cddata.c
+@@ -108,7 +108,7 @@ int cdfs_read_rawDATA_frame(struct super
+ bh=cdfs_bread(sb, lba, CD_FRAMESIZE);
+ if (!bh) {
+ // dit gebeurt indien track1!=ISO is, bv. De Morgen CD
+- printk("cdfs_read_rawDATA(%x, %u, %x) FAILED!\n", (unsigned)sb, lba, (unsigned)buf);
++ printk("cdfs_read_rawDATA(%lx, %u, %lx) FAILED!\n", (unsigned long)sb, lba, (unsigned long)buf);
+ } else {
+ memcpy(buf, bh->b_data, CD_FRAMESIZE);
+ brelse(bh);
+Index: cdfs-2.6.27/proc.c
+===================================================================
+--- cdfs-2.6.27.orig/proc.c
++++ cdfs-2.6.27/proc.c
+@@ -262,7 +262,7 @@ cdfs_show(struct seq_file *file_p, void
+ if (track_p->iso_size) {
+ seq_printf(
+ file_p,
+- "Track %2d: data track (%s), [%d-%d/%d], length=%d MB\n",
++ "Track %2ld: data track (%s), [%d-%d/%d], length=%d MB\n",
+ TRACK_POINTER_TO_TRACK_NUMBER(track_p),
+ track_p->name,
+ track_p->start_lba,
+@@ -313,7 +313,7 @@ cdfs_show(struct seq_file *file_p, void
+ } else {
+ seq_printf(
+ file_p,
+- "Track %2d: data track (%s), [%d-%d], length=%d kB\n",
++ "Track %2ld: data track (%s), [%d-%d], length=%d kB\n",
+ TRACK_POINTER_TO_TRACK_NUMBER(track_p),
+ track_p->name,
+ track_p->start_lba,
+@@ -362,7 +362,7 @@ cdfs_show(struct seq_file *file_p, void
+ cdfs_constructMSFsize(MSFsize, track_p->size);
+ seq_printf(
+ file_p,
+- "Track %2d: audio track (%s), [%8d -%8d], length=%s\n",
++ "Track %2ld: audio track (%s), [%8d -%8d], length=%s\n",
+ TRACK_POINTER_TO_TRACK_NUMBER(track_p),
+ track_p->name,
+ track_p->start_lba,
+Index: cdfs-2.6.27/root.c
+===================================================================
+--- cdfs-2.6.27.orig/root.c
++++ cdfs-2.6.27/root.c
+@@ -25,6 +25,7 @@
+ #include "cdfs.h"
+
+ #include <linux/module.h>
++#include <linux/sched.h>
+
+
+ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
+@@ -375,7 +376,9 @@ out:
+
+ PRINT("retinode = %ld\n", retinode->i_ino);
+
+- sb->s_root = d_alloc_root(retinode);
++ sb->s_root = d_make_root(retinode);
++ if (sb->s_root != NULL)
++ return -ENOMEM;
+
+ cdfs_proc_cd = this_cd;
+
+@@ -517,7 +520,7 @@ static void cdfs_read_inode(struct inode
+
+ i->i_uid = this_cd->uid;
+ i->i_gid = this_cd->gid;
+- i->i_nlink = 1;
++ set_nlink(i, 1);
+ i->i_op = &cdfs_inode_operations;
+ i->i_fop = NULL;
+ i->i_data.a_ops = NULL;
+@@ -594,26 +597,20 @@ static struct super_operations cdfs_ops
+ .statfs = cdfs_statfs
+ };
+
+-#ifdef OLD_KERNEL
+-static DECLARE_FSTYPE_DEV(cdfs_fs_type, FSNAME, cdfs_mount);
+-#else
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+-static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) {
+- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt);
+-#else
+-static struct super_block *cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) {
+- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super);
+-#endif
++static struct dentry *
++cdfs_mount_modern(struct file_system_type *fstype, int flags,
++ const char *dev_name, void *data)
++{
++ return mount_bdev(fstype, flags, dev_name, data, cdfs_fill_super);
+ }
+
+ static struct file_system_type cdfs_fs_type = {
+ .owner = THIS_MODULE,
+ .name = "cdfs",
+- .get_sb = cdfs_get_sb,
++ .mount = cdfs_mount_modern,
+ .kill_sb = kill_block_super,
+ .fs_flags = FS_REQUIRES_DEV
+ };
+-#endif
+
+ /******************************************************/
+