Linus Torvalds wrote:
>
[deletia]
>
> So returning 0 for write() is usually a bad idea - exactly because it
> does not have very well-defined semantics. So -EFBIG is certainly the
> preferable return value, and seems to be what SuS wants, too.
And what LFS wants too:
2.2.1.27 write() and writev()
DESCRIPTION
For regular files, no data transfer will occur past the offset
maximum established in the open file description associated with
fildes.
ERRORS
These functions will fail if:
[EFBIG]
The file is a regular file, nbyte is greater than 0 and the
starting position is greater than or equal to the offset
maximum established in the open file description associated
with fildes.
Note: This is an additional EFBIG error condition.
--
David N. Lombard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/