Re: [patch] s_maxbytes handling

From: David N. Lombard (david.lombard@mscsoftware.com)
Date: Tue May 22 2001 - 13:24:45 EST


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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 23 2001 - 21:00:48 EST