Re: write fop

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

 



On 9/8/05, Hinko Kocevar <hinko.kocevar@xxxxxxxxxxxxxxx> wrote:
Hi,

I've coded linux device driver for my hw device and I was wondering what
is  prefered return value for write function if user invokes it as:

        write(fd, buf, 0);

Note the 0 count. Currently I'm checking count and I'm returning 0 from
the write operation in case count == 0. What happens is that first write
successfully returns (no data), but subsequent calls to write block in
the write function!?
I've tried returning -EINVAL but ended up with the same results.

Any suggestions?

can u attach a snippet of the code u wrote to specific.

it may help .
:-)
 
regards

regards,

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




--
play the game

[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