Re: readv() return and errno
Tue, 26 Mar 2002 21:15:44 GMT

From Tue Mar 26 18:13:40 2002

Doesn't seem confusing at all.

On success readv returns the number of bytes read. On
success writev returns the number of bytes written. On
error, -1 is returned, and errno is set appropriately.

EINVAL An invalid argument was given. For instance count
might be greater than MAX_IOVEC, or zero. fd could
also be attached to an object which is unsuit-
able for reading (for readv) or writing (for

I don't see much in the way of waffle words. If count is greater than
MAX_IOVEC or zero you get EINVAL.

Yes, without hesitation you choose the wrong interpretation.
That is why I explained in so much detail what the right
interpretation is. Since you perhaps still do not understand,
let me reiterate:

The above ERRORS section says: In case this call returns EINVAL
one of the possible reasons is that an invalid argument was given.
There do exist Unix-like systems (not necessarily Linux) that
consider a zero count invalid.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at