On 9/14/05, raja <vnagaraju@xxxxxxxxxxxx> wrote: > 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. The return value for end of file/device is 0 and negative value shows error .......... and the +ve value mentions how much read/write had been performed ........ plzz do consult Linux Device Drivers 3rd Edition book ........... just search or it on google ..... > > Will you please help me. -- Fawad Lateef -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/