mirror of https://github.com/mkerrisk/man-pages
open.2: EFBIG error is now EOVERFLOW (since Linux 2.6.24)
When a 32-bit app opens a file whose size is too big to be represented in 31-bits, POSIX.1 specifies the error EOVERFLOW. Linux used to give EFBIG for this case, but 2.6.24 fixed this. Also, add some text to describe the error scenario in more detail. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
fecaa19a28
commit
7c7fb55221
35
man2/open.2
35
man2/open.2
|
@ -47,7 +47,7 @@
|
|||
.\" FIXME . Apr 08: The next POSIX revision has O_EXEC, O_SEARCH, and
|
||||
.\" O_TTYINIT. Eventually these may need to be documented. --mtk
|
||||
.\"
|
||||
.TH OPEN 2 2008-11-04 "Linux" "Linux Programmer's Manual"
|
||||
.TH OPEN 2 2008-12-03 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
open, creat \- open and possibly create a file or device
|
||||
.SH SYNOPSIS
|
||||
|
@ -470,17 +470,8 @@ were used.
|
|||
points outside your accessible address space.
|
||||
.TP
|
||||
.B EFBIG
|
||||
.I pathname
|
||||
refers to a regular file, too large to be opened; see
|
||||
.B O_LARGEFILE
|
||||
above.
|
||||
(POSIX.1-2001 specifies the error
|
||||
.B EOVERFLOW
|
||||
for this case.)
|
||||
.\" FIXME . Maybe this deviation from the standard will get repaired.
|
||||
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=7253
|
||||
.\" "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
|
||||
.\" Reported 2006-10-03
|
||||
See
|
||||
.BR EOVERFLOW .
|
||||
.TP
|
||||
.B EINTR
|
||||
While blocked waiting to complete an open of a slow device
|
||||
|
@ -551,6 +542,26 @@ is set, the named file is a FIFO and
|
|||
no process has the file open for reading.
|
||||
Or, the file is a device special file and no corresponding device exists.
|
||||
.TP
|
||||
.B EOVERFLOW
|
||||
.I pathname
|
||||
refers to a regular file that is too large to be opened.
|
||||
The usual scenario here is that an application compiled
|
||||
on a 32-bit platform without
|
||||
.I -D_FILE_OFF_SET_BITS=64
|
||||
tried to open a file whose size exceeds
|
||||
.I (2<<31)-1
|
||||
bits;
|
||||
see also
|
||||
.B O_LARGEFILE
|
||||
above.
|
||||
This is the error specified by POSIX.1-2001;
|
||||
in kernels before 2.6.24, Linux gave the error
|
||||
.B EFBIG
|
||||
for this case.
|
||||
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=7253
|
||||
.\" "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
|
||||
.\" Reported 2006-10-03
|
||||
.TP
|
||||
.B EPERM
|
||||
The
|
||||
.B O_NOATIME
|
||||
|
|
Loading…
Reference in New Issue