In Linux 2.6, the 'modify_ldt_ldt_s' structure was renamed 'user_desc'.

Include definition of 'user_desc' structure.
Minor rewordings.
This commit is contained in:
Michael Kerrisk 2007-06-02 20:55:04 +00:00
parent 1272ab1816
commit 5a16bf48ff
1 changed files with 33 additions and 3 deletions

View File

@ -54,10 +54,39 @@ is 1,
modifies one ldt entry. modifies one ldt entry.
.I ptr .I ptr
points to a points to a
.I modify_ldt_ldt_s .I user_desc
structure and structure
and
.I bytecount .I bytecount
must equal the size of this structure. 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 <asm/ldt.h> 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 .\" .PP
.\" The ldt is specific for the calling process. Any attempts to change .\" 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 .\" the ldt to include the address space of another process or the kernel
@ -72,7 +101,8 @@ or 0 (for writing).
On failure, On failure,
.BR modify_ldt () .BR modify_ldt ()
returns \-1 and sets returns \-1 and sets
.IR errno . .IR errno
to indicate the error.
.SH ERRORS .SH ERRORS
.TP .TP
.B EFAULT .B EFAULT