aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@gmail.com>2012-09-17 07:49:43 +0700
committerRobby Workman <rworkman@slackbuilds.org>2012-09-16 23:07:09 -0500
commit90f6d063050adca351a006108c7e9059c30f83e0 (patch)
tree749bb6b4bc3097ad31bde568c43a1a7d2951c660 /system
parent59e8bac381504a9520e8ade5e6bd154f8d6f6f95 (diff)
system/cdfs: Fixed build (included upstream patches)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/cdfs/cdfs-3.3.diff144
-rw-r--r--system/cdfs/cdfs-include_sched_h.diff11
-rw-r--r--system/cdfs/cdfs.SlackBuild9
3 files changed, 149 insertions, 15 deletions
diff --git a/system/cdfs/cdfs-3.3.diff b/system/cdfs/cdfs-3.3.diff
new file mode 100644
index 0000000000000..c73f6338b0716
--- /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
+
+ /******************************************************/
+
diff --git a/system/cdfs/cdfs-include_sched_h.diff b/system/cdfs/cdfs-include_sched_h.diff
deleted file mode 100644
index 7f75712324a2b..0000000000000
--- a/system/cdfs/cdfs-include_sched_h.diff
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur cdfs-2.6.27.orig//root.c cdfs-2.6.27/root.c
---- cdfs-2.6.27.orig//root.c 2009-12-21 07:38:31.000000000 -0600
-+++ cdfs-2.6.27/root.c 2010-05-22 21:31:38.834543323 -0500
-@@ -25,6 +25,7 @@
- #include "cdfs.h"
-
- #include <linux/module.h>
-+#include <linux/sched.h>
-
-
- /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
diff --git a/system/cdfs/cdfs.SlackBuild b/system/cdfs/cdfs.SlackBuild
index 41a092d3276d7..9a43a3b4cbb2c 100644
--- a/system/cdfs/cdfs.SlackBuild
+++ b/system/cdfs/cdfs.SlackBuild
@@ -23,11 +23,12 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Maintained by markus reichelt <slackbuilds@mareichelt.de> 0xCCEEF115
+# Modified by Willy Sudiarto Raharjo <willysr@slackware-id.org>
PRGNAM=cdfs
-VERSION=2.6.27
+VERSION=${VERSION:-2.6.27}
ARCH=$(uname -m)
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
KERNEL=${KERNEL:-"$(uname -r)"}
@@ -52,8 +53,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Include linux/sched.h in root.c
-patch -p1 < $CWD/cdfs-include_sched_h.diff
+# include new upstream patches
+patch -p1 < $CWD/cdfs-3.3.diff
make KDIR=/lib/modules/${KERNEL}/build