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