lkml.org 
[lkml]   [2001]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] s_maxbytes handling
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/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.068 / U:2.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site