[arch-commits] Commit in cdfs/repos (14 files)

Tobias Powalowski tpowa at nymeria.archlinux.org
Sun May 26 11:40:02 EDT 2013


    Date: Sunday, May 26, 2013 @ 17:40:02
  Author: tpowa
Revision: 91715

archrelease: copy trunk to community-testing-i686, community-testing-x86_64

Added:
  cdfs/repos/community-testing-i686/
  cdfs/repos/community-testing-i686/PKGBUILD
    (from rev 91714, cdfs/trunk/PKGBUILD)
  cdfs/repos/community-testing-i686/cdfs-3.0.patch
    (from rev 91714, cdfs/trunk/cdfs-3.0.patch)
  cdfs/repos/community-testing-i686/cdfs-3.2.patch
    (from rev 91714, cdfs/trunk/cdfs-3.2.patch)
  cdfs/repos/community-testing-i686/cdfs-3.4.patch
    (from rev 91714, cdfs/trunk/cdfs-3.4.patch)
  cdfs/repos/community-testing-i686/cdfs-3.8.patch
    (from rev 91714, cdfs/trunk/cdfs-3.8.patch)
  cdfs/repos/community-testing-i686/cdfs.install
    (from rev 91714, cdfs/trunk/cdfs.install)
  cdfs/repos/community-testing-x86_64/
  cdfs/repos/community-testing-x86_64/PKGBUILD
    (from rev 91714, cdfs/trunk/PKGBUILD)
  cdfs/repos/community-testing-x86_64/cdfs-3.0.patch
    (from rev 91714, cdfs/trunk/cdfs-3.0.patch)
  cdfs/repos/community-testing-x86_64/cdfs-3.2.patch
    (from rev 91714, cdfs/trunk/cdfs-3.2.patch)
  cdfs/repos/community-testing-x86_64/cdfs-3.4.patch
    (from rev 91714, cdfs/trunk/cdfs-3.4.patch)
  cdfs/repos/community-testing-x86_64/cdfs-3.8.patch
    (from rev 91714, cdfs/trunk/cdfs-3.8.patch)
  cdfs/repos/community-testing-x86_64/cdfs.install
    (from rev 91714, cdfs/trunk/cdfs.install)

-----------------------------------------+
 community-testing-i686/PKGBUILD         |   42 ++++
 community-testing-i686/cdfs-3.0.patch   |  274 ++++++++++++++++++++++++++++++
 community-testing-i686/cdfs-3.2.patch   |   12 +
 community-testing-i686/cdfs-3.4.patch   |   12 +
 community-testing-i686/cdfs-3.8.patch   |   42 ++++
 community-testing-i686/cdfs.install     |   14 +
 community-testing-x86_64/PKGBUILD       |   42 ++++
 community-testing-x86_64/cdfs-3.0.patch |  274 ++++++++++++++++++++++++++++++
 community-testing-x86_64/cdfs-3.2.patch |   12 +
 community-testing-x86_64/cdfs-3.4.patch |   12 +
 community-testing-x86_64/cdfs-3.8.patch |   42 ++++
 community-testing-x86_64/cdfs.install   |   14 +
 12 files changed, 792 insertions(+)

Copied: cdfs/repos/community-testing-i686/PKGBUILD (from rev 91714, cdfs/trunk/PKGBUILD)
===================================================================
--- community-testing-i686/PKGBUILD	                        (rev 0)
+++ community-testing-i686/PKGBUILD	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: J. Santiago Hirschfeld <jsantiagoh at yahoo.com.ar>
+
+pkgname=cdfs
+pkgver=2.6.27
+_extramodules=extramodules-3.9-ARCH # Don't forget to update cdfs.install
+pkgrel=45
+pkgdesc="File system module that 'exports' all tracks and boot images on a CD as normal files."
+arch=(i686 x86_64)
+url="http://www.elis.UGent.be/~ronsse/cdfs/"
+license=('GPL')
+depends=('linux>=3.9' 'linux<3.10')
+makedepends=('linux-headers')
+install=cdfs.install
+source=("http://www.elis.UGent.be/~ronsse/cdfs/download/$pkgname-$pkgver.tar.bz2"
+	"cdfs-3.0.patch"
+	"cdfs-3.2.patch"
+	"cdfs-3.4.patch"
+	"cdfs-3.8.patch")
+md5sums=('ac64c014a90e3c488394832ea29605b3'
+         'aba7da94a9dcbb8a93ea423cb6958fef'
+         'e934407b3460257a301822ffc4ab3933'
+         '9215e7bdac728bd2f889fb525e543454'
+         'b036fd72b033294605bec2b60a73e3bd')
+
+build() {
+  _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+
+  cd $srcdir/$pkgname-$pkgver
+  patch -p1 <$srcdir/cdfs-3.0.patch
+  patch -p1 <$srcdir/cdfs-3.2.patch
+  patch -p1 <$srcdir/cdfs-3.4.patch
+  patch -p1 <$srcdir/cdfs-3.8.patch
+  make KDIR=/usr/lib/modules/${_kernver}/build
+  sed -i "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" $startdir/cdfs.install
+}
+
+package() {
+  cd $srcdir/$pkgname-$pkgver
+  install -Dm0644 cdfs.ko $pkgdir/usr/lib/modules/$_extramodules/cdfs.ko
+}

Copied: cdfs/repos/community-testing-i686/cdfs-3.0.patch (from rev 91714, cdfs/trunk/cdfs-3.0.patch)
===================================================================
--- community-testing-i686/cdfs-3.0.patch	                        (rev 0)
+++ community-testing-i686/cdfs-3.0.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,274 @@
+diff -wbBur cdfs-2.6.27/cddata.c cdfs-2.6.27.my/cddata.c
+--- cdfs-2.6.27/cddata.c	2009-12-21 17:04:03.000000000 +0300
++++ cdfs-2.6.27.my/cddata.c	2011-07-24 21:18:44.000000000 +0400
+@@ -83,7 +83,7 @@
+ #else
+   .mmap             = generic_file_readonly_mmap,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+-  .sendfile         = generic_file_sendfile
++//  .sendfile         = generic_file_sendfile
+ #else
+   .splice_read      = generic_file_splice_read
+ #endif
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c	2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c	2011-07-25 13:16:59.000000000 +0400
+@@ -32,19 +30,14 @@
+  *	Added code to transform /proc/cdfs into a sequential synthetic file.  *
+  *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+ 
+-
+ #include <linux/seq_file.h>
+-
+-#ifndef OLD_KERNEL
+ #include <linux/statfs.h>
+-#endif
++#include <linux/sched.h>
+ 
+ extern struct seq_operations cdfs_operations;
+ extern struct _track_info *dummy_track_p;
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) 
+ struct inode *cdfs_iget(struct super_block *sp, unsigned long ino); 
+-#endif
+ /*============================================================================*
+  *  cdfs_open()                                                               *
+  *	Description:                                                          *
+@@ -115,15 +108,8 @@
+ 
+ /********************************************************************/
+ 
+-#ifdef OLD_KERNEL
+-static struct super_block * cdfs_mount(struct super_block *sb, void *data, int silent){
+-  kdev_t dev = sb->s_dev;
+-  int i, j, t;
+-  struct cdrom_tochdr  hdr;
+-#else
+ static int cdfs_fill_super(struct super_block *sb, void *data, int silent){
+   int i, t;
+-#endif
+   struct cdrom_tocentry   entry;   
+   int no_audio=0, no_data=0;
+   cd * this_cd;
+@@ -131,24 +117,13 @@
+ 
+   PRINT("cdfs_mount\n");
+ 
+-#ifdef OLD_KERNEL
+-  MOD_INC_USE_COUNT;
+-
+-  set_blocksize(dev, CD_FRAMESIZE);  // voor bread met ide-cd
+-#else
+   sb_set_blocksize(sb, CD_FRAMESIZE);  // voor bread met ide-cd
+-#endif
+ 
+   sb->s_blocksize = CD_FRAMESIZE;
+   sb->s_blocksize_bits = 11;
+ 
+   if (!(this_cd = cdfs_info(sb) = kmalloc(sizeof(cd), GFP_KERNEL))){
+-#ifdef OLD_KERNEL
+-    MOD_DEC_USE_COUNT;     
+-    return NULL;
+-#else
+     return -ENOMEM;
+-#endif
+   }
+ 
+   this_cd->mode           = MODE;
+@@ -160,13 +135,8 @@
+ 
+   // Initialize cache for maximum sector size
+   if (!(this_cd->cache = kmalloc(CD_FRAMESIZE_RAWER*CACHE_SIZE, GFP_KERNEL))) {
+-#ifdef OLD_KERNEL
+-    MOD_DEC_USE_COUNT;
+-    return NULL;
+-#else
+     kfree(cdfs_info(sb));
+     return -ENOMEM;
+-#endif
+   }
+ 
+   // Cache is still invalid
+@@ -183,23 +153,13 @@
+   if (this_cd->toc_scsi){
+     if (cdfs_toc_read_full(sb)){
+       printk("TOC read failed\n");
+-#ifdef OLD_KERNEL
+-      MOD_DEC_USE_COUNT;
+-      return NULL;
+-#else
+       goto invalid;
+-#endif
+     }
+   } else {
+     //if (cdfs_ioctl(sb, CDROMREADTOCHDR, (unsigned long)&hdr)){
+     if (cdfs_toc_read(sb)){
+       printk("cdfs_toc_read failed\n");
+-#ifdef OLD_KERNEL
+-      MOD_DEC_USE_COUNT;
+-      return NULL;
+-#else
+       goto invalid;
+-#endif
+     }
+   }
+ 
+@@ -365,11 +325,7 @@
+   sb->s_flags |= MS_RDONLY;
+   sb->s_op     = &cdfs_ops;
+   /* always get inode status */
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+   retinode=cdfs_iget(sb, 0);
+-#else
+-  retinode=iget(sb, 0);
+-#endif
+   if ( IS_ERR(retinode) )
+     return PTR_ERR(retinode);
+ 
+@@ -379,16 +335,12 @@
+ 
+   cdfs_proc_cd = this_cd;
+ 
+-#ifdef OLD_KERNEL
+-  return sb;
+-#else
+   return 0;
+ 
+ invalid:
+   kfree(this_cd->cache);
+   kfree(cdfs_info(sb));
+   return -EINVAL;
+-#endif
+ }
+ 
+ /************************************************************************/
+@@ -410,27 +362,12 @@
+   // Remove /proc entry
+   cdfs_proc_cd = NULL; 
+   kfree(cdfs_info(sb));
+-
+-#ifdef OLD_KERNEL
+-  MOD_DEC_USE_COUNT;
+-#endif
+-
+ }
+ 
+ /************************************************************************/
+ 
+-#ifdef OLD_KERNEL
+-static int cdfs_statfs(struct super_block *sb, struct statfs *buf) {
+-  cd * this_cd = cdfs_info(sb);
+-#else
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ static int cdfs_statfs(struct dentry *d, struct kstatfs *buf) {
+   cd * this_cd = cdfs_info(d->d_sb);
+-#else
+-static int cdfs_statfs(struct super_block *sb, struct kstatfs *buf) {
+-  cd * this_cd = cdfs_info(sb);
+-#endif
+-#endif
+   PRINT("rmfs_statfs\n");
+ 
+   buf->f_type    = CDFS_MAGIC;
+@@ -460,11 +397,7 @@
+ 
+ /************************************************************************/
+ 
+-#ifdef OLD_KERNEL
+-static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry){
+-#else
+ static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){
+-#endif
+   struct inode * inode;
+   int i;
+   cd * this_cd = cdfs_info(dir->i_sb);
+@@ -480,15 +413,9 @@
+ /* Use goto and read inode with iget()/cdfs_iget() */
+ /* Thanks to David Howells for patch and Master class in his mail */
+ found:
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+ inode = cdfs_iget(dir->i_sb, i);
+ if (IS_ERR(inode))
+   return ERR_CAST(inode);
+-#else
+-  inode = iget(dir->i_sb, i);
+-  if (!inode)
+-    return ERR_PTR(-ENOMEM);
+-#endif
+ d_add(dentry, inode);
+ return NULL;
+ }
+@@ -529,12 +456,8 @@
+     i->i_fop   = &cdfs_dir_operations;
+   } else {                                          /* file */
+     i->i_size  = this_cd->track[i->i_ino].size;
+-#ifdef OLD_KERNEL
+-    i->i_mtime = i->i_atime = i->i_ctime = this_cd->track[i->i_ino].time;
+-#else
+     i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = this_cd->track[i->i_ino].time;
+     i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0;
+-#endif
+     i->i_mode  = this_cd->mode;
+     if ((this_cd->track[i->i_ino].type==DATA) && this_cd->track[i->i_ino].iso_size) {
+       i->i_fop          = &cdfs_cddata_file_operations; 
+@@ -587,33 +510,21 @@
+ /******************************************************************/
+ 
+ static struct super_operations cdfs_ops = {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+-  .read_inode = cdfs_read_inode,
+-#endif
+   .put_super  = cdfs_umount,
+   .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 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);
++//}
+ 
+ static struct file_system_type cdfs_fs_type = {
+   .owner    = THIS_MODULE,
+   .name     = "cdfs",
+-  .get_sb   = cdfs_get_sb,
++//  .get_sb   = cdfs_get_sb,
+   .kill_sb  = kill_block_super,
+   .fs_flags = FS_REQUIRES_DEV
+ };
+-#endif
+ 
+ /******************************************************/
+ 
+@@ -621,10 +532,6 @@
+ MODULE_DESCRIPTION("CDfs: a CD filesystem");
+ MODULE_LICENSE("GPL"); 
+ 
+-#ifdef OLD_KERNEL
+-EXPORT_NO_SYMBOLS;
+-#endif
+-
+ /******************************************************************/
+ 
+ static int __init cdfs_init(void) {
+@@ -676,11 +583,7 @@
+   
+   if (!options) return;
+   
+-#ifdef OLD_KERNEL
+-  for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) {
+-#else
+   while ((this_char = strsep(&options,",")) != NULL) {
+-#endif
+     
+     if (!strcmp(this_char,"single")) 
+       this_cd->single=TRUE;

Copied: cdfs/repos/community-testing-i686/cdfs-3.2.patch (from rev 91714, cdfs/trunk/cdfs-3.2.patch)
===================================================================
--- community-testing-i686/cdfs-3.2.patch	                        (rev 0)
+++ community-testing-i686/cdfs-3.2.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,12 @@
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c	2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c	2012-01-18 11:23:03.000000000 +0400
+@@ -517,7 +517,7 @@
+   
+   i->i_uid        = this_cd->uid;
+   i->i_gid        = this_cd->gid;
+-  i->i_nlink      = 1;
++  i->__i_nlink      = 1;
+   i->i_op         = &cdfs_inode_operations;
+   i->i_fop        = NULL;
+   i->i_data.a_ops = NULL;

Copied: cdfs/repos/community-testing-i686/cdfs-3.4.patch (from rev 91714, cdfs/trunk/cdfs-3.4.patch)
===================================================================
--- community-testing-i686/cdfs-3.4.patch	                        (rev 0)
+++ community-testing-i686/cdfs-3.4.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,12 @@
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c	2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c	2012-06-15 17:09:27.000000000 +0400
+@@ -375,7 +375,7 @@
+ 
+   PRINT("retinode = %ld\n", retinode->i_ino);
+ 
+-  sb->s_root   = d_alloc_root(retinode);
++  sb->s_root   = d_make_root(retinode);
+ 
+   cdfs_proc_cd = this_cd;
+ 

Copied: cdfs/repos/community-testing-i686/cdfs-3.8.patch (from rev 91714, cdfs/trunk/cdfs-3.8.patch)
===================================================================
--- community-testing-i686/cdfs-3.8.patch	                        (rev 0)
+++ community-testing-i686/cdfs-3.8.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,42 @@
+diff -upr cdfs-2.6.27.orig/daemon.c cdfs-2.6.27/daemon.c
+--- cdfs-2.6.27.orig/daemon.c	2009-12-21 16:02:50.000000000 +0200
++++ cdfs-2.6.27/daemon.c	2013-02-21 06:14:45.000000000 +0200
+@@ -158,7 +158,6 @@ int kcdfsd_thread(void *unused){
+   exit_files(current);  /* daemonize doesn't do exit_files */
+   daemonize();
+ #else
+-  daemonize("k"FSNAME"d");
+ 
+   /* Allow SIGTERM to quit properly when removing module */
+   /* By default with daemonize all signals are dropped */
+diff -upr cdfs-2.6.27.orig/root.c cdfs-2.6.27/root.c
+--- cdfs-2.6.27.orig/root.c	2009-12-21 15:38:31.000000000 +0200
++++ cdfs-2.6.27/root.c	2013-02-21 06:15:20.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include "cdfs.h"
+ 
+ #include <linux/module.h>
++#include <linux/kthread.h>
+ 
+ 
+ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
+@@ -643,14 +644,15 @@ static int __init cdfs_init(void) {
+   cdfs_proc_cd=NULL;
+ 
+   // start kernel thread
+-  if ((kcdfsd_pid = kernel_thread(kcdfsd_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND)) >0 ) {
+-    return 0;
+-  } else {
+-    printk(FSNAME" kernel_thread failed.\n");
++  kcdfsd_pid = kthread_run(kcdfsd_thread, NULL, "kcdfsd_thread");
++  if (IS_ERR(kcdfsd_pid)) {
++    printk(FSNAME" kthread_run failed.\n");
+     if (cdfs_proc_entry) remove_proc_entry(FSNAME, NULL);
+     unregister_filesystem(&cdfs_fs_type);
+     return -1;
+   }
++
++  return 0;
+ }
+ 
+ /******************************************************************/

Copied: cdfs/repos/community-testing-i686/cdfs.install (from rev 91714, cdfs/trunk/cdfs.install)
===================================================================
--- community-testing-i686/cdfs.install	                        (rev 0)
+++ community-testing-i686/cdfs.install	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,14 @@
+post_install() {
+  EXTRAMODULES='extramodules-3.9-ARCH'
+  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+  EXTRAMODULES='extramodules-3.9-ARCH'
+  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_remove() {
+  EXTRAMODULES='extramodules-3.9-ARCH'
+  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}

Copied: cdfs/repos/community-testing-x86_64/PKGBUILD (from rev 91714, cdfs/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: J. Santiago Hirschfeld <jsantiagoh at yahoo.com.ar>
+
+pkgname=cdfs
+pkgver=2.6.27
+_extramodules=extramodules-3.9-ARCH # Don't forget to update cdfs.install
+pkgrel=45
+pkgdesc="File system module that 'exports' all tracks and boot images on a CD as normal files."
+arch=(i686 x86_64)
+url="http://www.elis.UGent.be/~ronsse/cdfs/"
+license=('GPL')
+depends=('linux>=3.9' 'linux<3.10')
+makedepends=('linux-headers')
+install=cdfs.install
+source=("http://www.elis.UGent.be/~ronsse/cdfs/download/$pkgname-$pkgver.tar.bz2"
+	"cdfs-3.0.patch"
+	"cdfs-3.2.patch"
+	"cdfs-3.4.patch"
+	"cdfs-3.8.patch")
+md5sums=('ac64c014a90e3c488394832ea29605b3'
+         'aba7da94a9dcbb8a93ea423cb6958fef'
+         'e934407b3460257a301822ffc4ab3933'
+         '9215e7bdac728bd2f889fb525e543454'
+         'b036fd72b033294605bec2b60a73e3bd')
+
+build() {
+  _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+
+  cd $srcdir/$pkgname-$pkgver
+  patch -p1 <$srcdir/cdfs-3.0.patch
+  patch -p1 <$srcdir/cdfs-3.2.patch
+  patch -p1 <$srcdir/cdfs-3.4.patch
+  patch -p1 <$srcdir/cdfs-3.8.patch
+  make KDIR=/usr/lib/modules/${_kernver}/build
+  sed -i "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" $startdir/cdfs.install
+}
+
+package() {
+  cd $srcdir/$pkgname-$pkgver
+  install -Dm0644 cdfs.ko $pkgdir/usr/lib/modules/$_extramodules/cdfs.ko
+}

Copied: cdfs/repos/community-testing-x86_64/cdfs-3.0.patch (from rev 91714, cdfs/trunk/cdfs-3.0.patch)
===================================================================
--- community-testing-x86_64/cdfs-3.0.patch	                        (rev 0)
+++ community-testing-x86_64/cdfs-3.0.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,274 @@
+diff -wbBur cdfs-2.6.27/cddata.c cdfs-2.6.27.my/cddata.c
+--- cdfs-2.6.27/cddata.c	2009-12-21 17:04:03.000000000 +0300
++++ cdfs-2.6.27.my/cddata.c	2011-07-24 21:18:44.000000000 +0400
+@@ -83,7 +83,7 @@
+ #else
+   .mmap             = generic_file_readonly_mmap,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+-  .sendfile         = generic_file_sendfile
++//  .sendfile         = generic_file_sendfile
+ #else
+   .splice_read      = generic_file_splice_read
+ #endif
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c	2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c	2011-07-25 13:16:59.000000000 +0400
+@@ -32,19 +30,14 @@
+  *	Added code to transform /proc/cdfs into a sequential synthetic file.  *
+  *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+ 
+-
+ #include <linux/seq_file.h>
+-
+-#ifndef OLD_KERNEL
+ #include <linux/statfs.h>
+-#endif
++#include <linux/sched.h>
+ 
+ extern struct seq_operations cdfs_operations;
+ extern struct _track_info *dummy_track_p;
+ 
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) 
+ struct inode *cdfs_iget(struct super_block *sp, unsigned long ino); 
+-#endif
+ /*============================================================================*
+  *  cdfs_open()                                                               *
+  *	Description:                                                          *
+@@ -115,15 +108,8 @@
+ 
+ /********************************************************************/
+ 
+-#ifdef OLD_KERNEL
+-static struct super_block * cdfs_mount(struct super_block *sb, void *data, int silent){
+-  kdev_t dev = sb->s_dev;
+-  int i, j, t;
+-  struct cdrom_tochdr  hdr;
+-#else
+ static int cdfs_fill_super(struct super_block *sb, void *data, int silent){
+   int i, t;
+-#endif
+   struct cdrom_tocentry   entry;   
+   int no_audio=0, no_data=0;
+   cd * this_cd;
+@@ -131,24 +117,13 @@
+ 
+   PRINT("cdfs_mount\n");
+ 
+-#ifdef OLD_KERNEL
+-  MOD_INC_USE_COUNT;
+-
+-  set_blocksize(dev, CD_FRAMESIZE);  // voor bread met ide-cd
+-#else
+   sb_set_blocksize(sb, CD_FRAMESIZE);  // voor bread met ide-cd
+-#endif
+ 
+   sb->s_blocksize = CD_FRAMESIZE;
+   sb->s_blocksize_bits = 11;
+ 
+   if (!(this_cd = cdfs_info(sb) = kmalloc(sizeof(cd), GFP_KERNEL))){
+-#ifdef OLD_KERNEL
+-    MOD_DEC_USE_COUNT;     
+-    return NULL;
+-#else
+     return -ENOMEM;
+-#endif
+   }
+ 
+   this_cd->mode           = MODE;
+@@ -160,13 +135,8 @@
+ 
+   // Initialize cache for maximum sector size
+   if (!(this_cd->cache = kmalloc(CD_FRAMESIZE_RAWER*CACHE_SIZE, GFP_KERNEL))) {
+-#ifdef OLD_KERNEL
+-    MOD_DEC_USE_COUNT;
+-    return NULL;
+-#else
+     kfree(cdfs_info(sb));
+     return -ENOMEM;
+-#endif
+   }
+ 
+   // Cache is still invalid
+@@ -183,23 +153,13 @@
+   if (this_cd->toc_scsi){
+     if (cdfs_toc_read_full(sb)){
+       printk("TOC read failed\n");
+-#ifdef OLD_KERNEL
+-      MOD_DEC_USE_COUNT;
+-      return NULL;
+-#else
+       goto invalid;
+-#endif
+     }
+   } else {
+     //if (cdfs_ioctl(sb, CDROMREADTOCHDR, (unsigned long)&hdr)){
+     if (cdfs_toc_read(sb)){
+       printk("cdfs_toc_read failed\n");
+-#ifdef OLD_KERNEL
+-      MOD_DEC_USE_COUNT;
+-      return NULL;
+-#else
+       goto invalid;
+-#endif
+     }
+   }
+ 
+@@ -365,11 +325,7 @@
+   sb->s_flags |= MS_RDONLY;
+   sb->s_op     = &cdfs_ops;
+   /* always get inode status */
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+   retinode=cdfs_iget(sb, 0);
+-#else
+-  retinode=iget(sb, 0);
+-#endif
+   if ( IS_ERR(retinode) )
+     return PTR_ERR(retinode);
+ 
+@@ -379,16 +335,12 @@
+ 
+   cdfs_proc_cd = this_cd;
+ 
+-#ifdef OLD_KERNEL
+-  return sb;
+-#else
+   return 0;
+ 
+ invalid:
+   kfree(this_cd->cache);
+   kfree(cdfs_info(sb));
+   return -EINVAL;
+-#endif
+ }
+ 
+ /************************************************************************/
+@@ -410,27 +362,12 @@
+   // Remove /proc entry
+   cdfs_proc_cd = NULL; 
+   kfree(cdfs_info(sb));
+-
+-#ifdef OLD_KERNEL
+-  MOD_DEC_USE_COUNT;
+-#endif
+-
+ }
+ 
+ /************************************************************************/
+ 
+-#ifdef OLD_KERNEL
+-static int cdfs_statfs(struct super_block *sb, struct statfs *buf) {
+-  cd * this_cd = cdfs_info(sb);
+-#else
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ static int cdfs_statfs(struct dentry *d, struct kstatfs *buf) {
+   cd * this_cd = cdfs_info(d->d_sb);
+-#else
+-static int cdfs_statfs(struct super_block *sb, struct kstatfs *buf) {
+-  cd * this_cd = cdfs_info(sb);
+-#endif
+-#endif
+   PRINT("rmfs_statfs\n");
+ 
+   buf->f_type    = CDFS_MAGIC;
+@@ -460,11 +397,7 @@
+ 
+ /************************************************************************/
+ 
+-#ifdef OLD_KERNEL
+-static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry){
+-#else
+ static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){
+-#endif
+   struct inode * inode;
+   int i;
+   cd * this_cd = cdfs_info(dir->i_sb);
+@@ -480,15 +413,9 @@
+ /* Use goto and read inode with iget()/cdfs_iget() */
+ /* Thanks to David Howells for patch and Master class in his mail */
+ found:
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+ inode = cdfs_iget(dir->i_sb, i);
+ if (IS_ERR(inode))
+   return ERR_CAST(inode);
+-#else
+-  inode = iget(dir->i_sb, i);
+-  if (!inode)
+-    return ERR_PTR(-ENOMEM);
+-#endif
+ d_add(dentry, inode);
+ return NULL;
+ }
+@@ -529,12 +456,8 @@
+     i->i_fop   = &cdfs_dir_operations;
+   } else {                                          /* file */
+     i->i_size  = this_cd->track[i->i_ino].size;
+-#ifdef OLD_KERNEL
+-    i->i_mtime = i->i_atime = i->i_ctime = this_cd->track[i->i_ino].time;
+-#else
+     i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = this_cd->track[i->i_ino].time;
+     i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0;
+-#endif
+     i->i_mode  = this_cd->mode;
+     if ((this_cd->track[i->i_ino].type==DATA) && this_cd->track[i->i_ino].iso_size) {
+       i->i_fop          = &cdfs_cddata_file_operations; 
+@@ -587,33 +510,21 @@
+ /******************************************************************/
+ 
+ static struct super_operations cdfs_ops = {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+-  .read_inode = cdfs_read_inode,
+-#endif
+   .put_super  = cdfs_umount,
+   .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 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);
++//}
+ 
+ static struct file_system_type cdfs_fs_type = {
+   .owner    = THIS_MODULE,
+   .name     = "cdfs",
+-  .get_sb   = cdfs_get_sb,
++//  .get_sb   = cdfs_get_sb,
+   .kill_sb  = kill_block_super,
+   .fs_flags = FS_REQUIRES_DEV
+ };
+-#endif
+ 
+ /******************************************************/
+ 
+@@ -621,10 +532,6 @@
+ MODULE_DESCRIPTION("CDfs: a CD filesystem");
+ MODULE_LICENSE("GPL"); 
+ 
+-#ifdef OLD_KERNEL
+-EXPORT_NO_SYMBOLS;
+-#endif
+-
+ /******************************************************************/
+ 
+ static int __init cdfs_init(void) {
+@@ -676,11 +583,7 @@
+   
+   if (!options) return;
+   
+-#ifdef OLD_KERNEL
+-  for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) {
+-#else
+   while ((this_char = strsep(&options,",")) != NULL) {
+-#endif
+     
+     if (!strcmp(this_char,"single")) 
+       this_cd->single=TRUE;

Copied: cdfs/repos/community-testing-x86_64/cdfs-3.2.patch (from rev 91714, cdfs/trunk/cdfs-3.2.patch)
===================================================================
--- community-testing-x86_64/cdfs-3.2.patch	                        (rev 0)
+++ community-testing-x86_64/cdfs-3.2.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,12 @@
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c	2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c	2012-01-18 11:23:03.000000000 +0400
+@@ -517,7 +517,7 @@
+   
+   i->i_uid        = this_cd->uid;
+   i->i_gid        = this_cd->gid;
+-  i->i_nlink      = 1;
++  i->__i_nlink      = 1;
+   i->i_op         = &cdfs_inode_operations;
+   i->i_fop        = NULL;
+   i->i_data.a_ops = NULL;

Copied: cdfs/repos/community-testing-x86_64/cdfs-3.4.patch (from rev 91714, cdfs/trunk/cdfs-3.4.patch)
===================================================================
--- community-testing-x86_64/cdfs-3.4.patch	                        (rev 0)
+++ community-testing-x86_64/cdfs-3.4.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,12 @@
+diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c
+--- cdfs-2.6.27/root.c	2009-12-21 16:38:31.000000000 +0300
++++ cdfs-2.6.27.my/root.c	2012-06-15 17:09:27.000000000 +0400
+@@ -375,7 +375,7 @@
+ 
+   PRINT("retinode = %ld\n", retinode->i_ino);
+ 
+-  sb->s_root   = d_alloc_root(retinode);
++  sb->s_root   = d_make_root(retinode);
+ 
+   cdfs_proc_cd = this_cd;
+ 

Copied: cdfs/repos/community-testing-x86_64/cdfs-3.8.patch (from rev 91714, cdfs/trunk/cdfs-3.8.patch)
===================================================================
--- community-testing-x86_64/cdfs-3.8.patch	                        (rev 0)
+++ community-testing-x86_64/cdfs-3.8.patch	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,42 @@
+diff -upr cdfs-2.6.27.orig/daemon.c cdfs-2.6.27/daemon.c
+--- cdfs-2.6.27.orig/daemon.c	2009-12-21 16:02:50.000000000 +0200
++++ cdfs-2.6.27/daemon.c	2013-02-21 06:14:45.000000000 +0200
+@@ -158,7 +158,6 @@ int kcdfsd_thread(void *unused){
+   exit_files(current);  /* daemonize doesn't do exit_files */
+   daemonize();
+ #else
+-  daemonize("k"FSNAME"d");
+ 
+   /* Allow SIGTERM to quit properly when removing module */
+   /* By default with daemonize all signals are dropped */
+diff -upr cdfs-2.6.27.orig/root.c cdfs-2.6.27/root.c
+--- cdfs-2.6.27.orig/root.c	2009-12-21 15:38:31.000000000 +0200
++++ cdfs-2.6.27/root.c	2013-02-21 06:15:20.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include "cdfs.h"
+ 
+ #include <linux/module.h>
++#include <linux/kthread.h>
+ 
+ 
+ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
+@@ -643,14 +644,15 @@ static int __init cdfs_init(void) {
+   cdfs_proc_cd=NULL;
+ 
+   // start kernel thread
+-  if ((kcdfsd_pid = kernel_thread(kcdfsd_thread, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND)) >0 ) {
+-    return 0;
+-  } else {
+-    printk(FSNAME" kernel_thread failed.\n");
++  kcdfsd_pid = kthread_run(kcdfsd_thread, NULL, "kcdfsd_thread");
++  if (IS_ERR(kcdfsd_pid)) {
++    printk(FSNAME" kthread_run failed.\n");
+     if (cdfs_proc_entry) remove_proc_entry(FSNAME, NULL);
+     unregister_filesystem(&cdfs_fs_type);
+     return -1;
+   }
++
++  return 0;
+ }
+ 
+ /******************************************************************/

Copied: cdfs/repos/community-testing-x86_64/cdfs.install (from rev 91714, cdfs/trunk/cdfs.install)
===================================================================
--- community-testing-x86_64/cdfs.install	                        (rev 0)
+++ community-testing-x86_64/cdfs.install	2013-05-26 15:40:02 UTC (rev 91715)
@@ -0,0 +1,14 @@
+post_install() {
+  EXTRAMODULES='extramodules-3.9-ARCH'
+  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_upgrade() {
+  EXTRAMODULES='extramodules-3.9-ARCH'
+  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_remove() {
+  EXTRAMODULES='extramodules-3.9-ARCH'
+  depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}



More information about the arch-commits mailing list