Read in chardev

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

 



Hi.
I am implementing a character device.And I have a doubt while implementing write and read functions for that driver. In read function if the we have read all the data upto the maximum size of the device and then we call one more read what we have to return either 0 or -1.

And In Write function if we have written up to maximum size of the device and then if we are trying to write some more data then wht we have to return either error or 0.

Will you please help me.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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