diff --git a/man2/modify_ldt.2 b/man2/modify_ldt.2 index 8c5d99c50..30ba3018b 100644 --- a/man2/modify_ldt.2 +++ b/man2/modify_ldt.2 @@ -54,10 +54,39 @@ is 1, modifies one ldt entry. .I ptr points to a -.I modify_ldt_ldt_s -structure and +.I user_desc +structure +and .I bytecount must equal the size of this structure. +.\" +.\" FIXME, say something about func == 2 ans func == 0x11? +.\" In Linux 2.4, func == 2 returned "the default ldt" +.\" In Linux 2.6, func == 2 is a nop, returning a zeroed out structure. +.\" Linux 2.4 and 2.6 implement an operation for func == 0x11 + +The +.I user_desc +structure is defined in as: +.in +0.25i +.nf + +struct user_desc { + unsigned int entry_number; + unsigned long base_addr; + unsigned int limit; + unsigned int seg_32bit:1; + unsigned int contents:2; + unsigned int read_exec_only:1; + unsigned int limit_in_pages:1; + unsigned int seg_not_present:1; + unsigned int useable:1; +}; +.fi +.in +.PP +In Linux 2.4 and earlier, this structure was named +.IR modify_ldt_ldt_s . .\" .PP .\" The ldt is specific for the calling process. Any attempts to change .\" the ldt to include the address space of another process or the kernel @@ -72,7 +101,8 @@ or 0 (for writing). On failure, .BR modify_ldt () returns \-1 and sets -.IR errno . +.IR errno +to indicate the error. .SH ERRORS .TP .B EFAULT