From 22b22831756e2a2535feacbbac52f54f597c5bcf Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 6 Aug 2008 19:41:51 +0000 Subject: [PATCH] Remove EFAULT from errors. Under ENOMEM error, note that EFAULT was the error produced in some cases for kernels before 2.4.19. --- man2/mprotect.2 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/man2/mprotect.2 b/man2/mprotect.2 index df23af260..71af913c7 100644 --- a/man2/mprotect.2 +++ b/man2/mprotect.2 @@ -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