Re: 'No such device or address' when writing to device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/01/2010, Sam Carter <sam.w.carter@xxxxxxxxx> 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 <sam.w.carter@xxxxxxxxx>

>>>> static struct file_operations fops = {
>>>>     .owner = THIS_MODULE,
>>>>     .llseek = NULL,
>>>>     .read = read,
>>>>     .write = write,
>>>>     .ioctl = ioctlManager,
>>>>     .open = NULL,
>>>>     .release = NULL,
>>>> };

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux