Add a case to the EINVAL error text.

Various minor wording fixes
This commit is contained in:
Michael Kerrisk 2006-03-02 00:51:08 +00:00
parent 11da88fb12
commit 2374c17872
1 changed files with 10 additions and 7 deletions

View File

@ -78,16 +78,17 @@ bytes.
.PP .PP
The The
.BR lseek () .BR lseek ()
function allows the file offset to be set beyond the end of the existing function allows the file offset to be set beyond the end
end-of-file of the file (but this does not change the size of the file). of the file (but this does not change the size of the file).
If data is later written at this point, subsequent reads of the data If data is later written at this point, subsequent reads of the data
in the gap return null bytes ('\\0') until data is actually written into in the gap (a "hole") return null bytes ('\\0') until
the gap. data is actually written into the gap.
.SH "RETURN VALUE" .SH "RETURN VALUE"
Upon successful completion, Upon successful completion,
.BR lseek () .BR lseek ()
returns the resulting offset location as measured in bytes from the returns the resulting offset location as measured in bytes from the
beginning of the file. Otherwise, a value of (off_t)\-1 is returned and beginning of the file.
Otherwise, a value of \fI(off_t)\-1\fP is returned and
.I errno .I errno
is set to indicate the error. is set to indicate the error.
.SH ERRORS .SH ERRORS
@ -98,12 +99,14 @@ is not an open file descriptor.
.TP .TP
.B EINVAL .B EINVAL
.I whence .I whence
is not one of SEEK_SET, SEEK_CUR, SEEK_END, is not one of SEEK_SET, SEEK_CUR, SEEK_END;
or the resulting file offset would be negative. or the resulting file offset would be negative,
or beyond the end of a seekable device.
.\" Some systems may allow negative offsets for character devices .\" Some systems may allow negative offsets for character devices
.\" and/or for remote filesystems. .\" and/or for remote filesystems.
.TP .TP
.B EOVERFLOW .B EOVERFLOW
.\" HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
The resulting file offset cannot be represented in an The resulting file offset cannot be represented in an
.IR off_t . .IR off_t .
.TP .TP