Hi Srdjan and everyone.
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 <[email protected]>
> On 12/01/2010, Sam Carter <[email protected]> wrote:
> > The write function is defined in the same file and is, as of now,
> > unimplemented apart from the following.
> >
> > static int write(char *s){
>
> Correct me if I'm wrong, but shouldn't the function signature be:
>
> 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 <[email protected]>
>
> >>>> static struct file_operations fops = {
> >>>> .owner = THIS_MODULE,
> >>>> .llseek = NULL,
> >>>> .read = read,
> >>>> .write = write,
> >>>> .ioctl = ioctlManager,
> >>>> .open = NULL,
> >>>> .release = NULL,
> >>>> };
>