Thanks for pointing that out, I have updated my function.
ssize_t memo_write(struct file *filp, const char __user *buf, size_t count, loff_t *offp){
printk("write function\n");
ssize_t temp = -ENOMEM;
return temp;
}
However with a clean build reboot and insmod, I am having the same error. I'm sure I must be missing something obvious. What could be causing this?
2010/1/12 Srdjan Todorovic <todorovic.s@xxxxxxxxxxxxxx>
On 12/01/2010, Sam Carter <sam.w.carter@xxxxxxxxx> wrote:Correct me if I'm wrong, but shouldn't the function signature be:
> The write function is defined in the same file and is, as of now,
> unimplemented apart from the following.
>
> static int write(char *s){
ssize_t write(struct file *, const char __user *, size_t, loff_t *);
As per struct file_operations struct:
http://lxr.oss.org.cn/source/include/linux/fs.h#L872
Regards,
Srdjan
>>>> ------------------------------
>>>> *From:* Sam Carter <sam.w.carter@xxxxxxxxx>
>>>> static struct file_operations fops = {
>>>> .owner = THIS_MODULE,
>>>> .llseek = NULL,
>>>> .read = read,
>>>> .write = write,
>>>> .ioctl = ioctlManager,
>>>> .open = NULL,
>>>> .release = NULL,
>>>> };