Remove EFAULT from errors. Under ENOMEM error, note that EFAULT

was the error produced in some cases for kernels before 2.4.19.
This commit is contained in:
Michael Kerrisk 2008-08-06 19:41:51 +00:00
parent 4bc2109828
commit 22b2283175
1 changed files with 7 additions and 5 deletions

View File

@ -29,7 +29,7 @@
.\" 2007-06-02, mtk: Fairly substantial rewrites and additions, and
.\" a much improved example program.
.\"
.TH MPROTECT 2 2008-06-02 "Linux" "Linux Programmer's Manual"
.TH MPROTECT 2 2008-08-06 "Linux" "Linux Programmer's Manual"
.SH NAME
mprotect \- set protection on a region of memory
.SH SYNOPSIS
@ -87,9 +87,6 @@ a file to which you have read-only access, then ask
to mark it
.BR PROT_WRITE .
.TP
.B EFAULT
The memory cannot be accessed.
.TP
.B EINVAL
\fIaddr\fP is not a valid pointer,
or not a multiple of the system page size.
@ -97,11 +94,16 @@ or not a multiple of the system page size.
.TP
.B ENOMEM
Internal kernel structures could not be allocated.
Or: addresses in the range
.TP
.B ENOMEM
Addresses in the range
.RI [ addr ,
.IR addr + len ]
are invalid for the address space of the process,
or specify one or more pages that are not mapped.
(Before kernel 2.4.19, the error
.BR EFAULT
was incorrectly produced for these cases.)
.SH "CONFORMING TO"
SVr4, POSIX.1-2001.
.\" SVr4 defines an additional error