On 04/06/10 11:58, Amit Shah wrote:
It would certainly be beneficial for consumers of virtio-serial to be
notified of -EAGAIN so that the guest can be throttled till the chardev
catches up with the data being sent.
EAGAIN should only ever occur if no bytes are written.
Right. That, or just return 0 and let the caller handle the situation?
Go with the usual unix semantics instead of creating something new.
When something was written -- return the number of bytes. Caller has to
compare with the length passed in to figure whenever it was a partial
write or not.
When nothing was written -- return the error.
cheers,
Gerd