mirror of https://github.com/mkerrisk/man-pages
Add a case to the EINVAL error text.
Various minor wording fixes
This commit is contained in:
parent
11da88fb12
commit
2374c17872
17
man2/lseek.2
17
man2/lseek.2
|
@ -78,16 +78,17 @@ bytes.
|
|||
.PP
|
||||
The
|
||||
.BR lseek ()
|
||||
function allows the file offset to be set beyond the end of the existing
|
||||
end-of-file of the file (but this does not change the size of the file).
|
||||
function allows the file offset to be set beyond the end
|
||||
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
|
||||
in the gap return null bytes ('\\0') until data is actually written into
|
||||
the gap.
|
||||
in the gap (a "hole") return null bytes ('\\0') until
|
||||
data is actually written into the gap.
|
||||
.SH "RETURN VALUE"
|
||||
Upon successful completion,
|
||||
.BR lseek ()
|
||||
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
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
|
@ -98,12 +99,14 @@ is not an open file descriptor.
|
|||
.TP
|
||||
.B EINVAL
|
||||
.I whence
|
||||
is not one of SEEK_SET, SEEK_CUR, SEEK_END,
|
||||
or the resulting file offset would be negative.
|
||||
is not one of SEEK_SET, SEEK_CUR, SEEK_END;
|
||||
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
|
||||
.\" and/or for remote filesystems.
|
||||
.TP
|
||||
.B EOVERFLOW
|
||||
.\" HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
|
||||
The resulting file offset cannot be represented in an
|
||||
.IR off_t .
|
||||
.TP
|
||||
|
|
Loading…
Reference in New Issue