Ok, this one seems to work.
Here's patch:
$this->bbcode_second_pass_code('', '--- xce_dev_old.c 2010-03-23 14:52:24.000000000 -0600
+++ xce_dev.c 2012-06-28 03:48:00.000000000 -0600
@@ -17,10 +17,13 @@
#include <linux/miscdevice.h>
#include <linux/poll.h>
#include <linux/mm.h>
+#include <linux/sched.h>
#include <linux/pagemap.h>
#include <linux/mtd/mtd.h>
+#include <linux/slab.h>
+
#ifdef MODULE_ALIAS_MISCDEV
MODULE_ALIAS_MISCDEV(XCE_MINOR);
#endif
@@ -86,7 +89,7 @@
static ssize_t xce_dev_write(struct file *, const char __user *, size_t, loff_t *);
static int xce_dev_open(struct inode *, struct file *);
static int xce_dev_release(struct inode *, struct file *);
-static int xce_dev_ioctl(struct inode * i, struct file * f, unsigned int r, unsigned long p);
+static long xce_dev_ioctl(struct file * f, unsigned int r, unsigned long p);
static int xce_dev_mmap(struct file *, struct vm_area_struct *);
static unsigned int xce_dev_poll(struct file *, struct poll_table_struct *);
@@ -119,7 +122,7 @@
.write = xce_dev_write,
.open = xce_dev_open,
.release = xce_dev_release,
- .ioctl = xce_dev_ioctl,
+ .unlocked_ioctl = xce_dev_ioctl,
.mmap = xce_dev_mmap,
.poll = xce_dev_poll,
};
@@ -372,7 +375,7 @@
static ssize_t xce_dev_read(struct file * f, char __user * buf, size_t sz, loff_t * off)
{
- XCE_DLOG("Device read %zu bytes by PID: %d\n", sz, current->pid);
+ // XCE_DLOG("Device read %zu bytes by PID: %d\n", sz, current->pid);
return -EIO;
}
@@ -576,7 +579,7 @@
return 0;
}
-static int xce_dev_ioctl(struct inode * i, struct file * f, unsigned int cmd, unsigned long arg)
+static long xce_dev_ioctl(struct file * f, unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
unsigned int size;
')
Module is attached. I'll be away for a week so test the hell out of it
It goes into /usr/local/cloudengines/bin and replaces the existing xce.ko
EDIT: This module is compiled for kernel 3.1.10-11-ARCH and will only work with this version. If there's an update, this module will need to be recompiled. Check your kernel version if the module doesn't load (uname -a)