OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[linuxjm/LDP_man-pages.git] / draft / man2 / mprotect.2
index 2021e5b..27291e4 100644 (file)
@@ -41,7 +41,7 @@
 .\"WORD: protection             ¥¢¥¯¥»¥¹Êݸî
 .\"WORD: read-only              Æɤ߼è¤êÀìÍÑ
 .\"
-.TH MPROTECT 2 2008-08-06 "Linux" "Linux Programmer's Manual"
+.TH MPROTECT 2 2011-09-08 "Linux" "Linux Programmer's Manual"
 .\"O .SH NAME
 .SH Ì¾Á°
 .\"O mprotect \- set protection on a region of memory
@@ -152,14 +152,14 @@ mprotect \- 
 .B ENOMEM
 .\"O Addresses in the range
 .\"O .RI [ addr ,
-.\"O .IR addr + len ]
+.\"O .IR addr + len \-1]
 .\"O are invalid for the address space of the process,
 .\"O or specify one or more pages that are not mapped.
 .\"O (Before kernel 2.4.19, the error
 .\"O .BR EFAULT
 .\"O was incorrectly produced for these cases.)
 .RI [ addr ,
-.IR addr + len ]
+.IR addr + len \-1]
 ¤È¤¤¤¦ÈϰϤΥ¢¥É¥ì¥¹¤¬¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤È¤·¤ÆÉÔÀµ¤Ç¤¢¤ë¤«¡¢
 ¤½¤ÎÈϰϤΥ¢¥É¥ì¥¹¤¬¥Þ¥Ã¥×¤µ¤ì¤Æ¤¤¤Ê¤¤ 1 ¤Ä°Ê¾å¤Î¥Ú¡¼¥¸¤ò»Ø¤·¤Æ¤¤¤ë
 (¥«¡¼¥Í¥ë 2.4.19 ¤è¤êÁ°¤Ç¤Ï¡¢¤³¤Î¾õ¶·¤Ç¥¨¥é¡¼
@@ -308,7 +308,7 @@ main(void)
     printf("Start of region:        0x%lx\\n", (long) buffer);
 
     if (mprotect(buffer + pagesize * 2, pagesize,
-                PROT_NONE) == \-1)
+                PROT_READ) == \-1)
         handle_error("mprotect");
 
     for (p = buffer ; ; )