#include <sys/types.h> int modify_ldt(int func, void *ptr, unsigned long bytecount); |
When func is 0, modify_ldt() reads the ldt into the memory pointed to by ptr. The number of bytes read is the smaller of bytecount and the actual size of the ldt.
When func is 1, modify_ldt() modifies one ldt entry. ptr points to a modify_ldt_ldt_sstructure and bytecount must equal the size of this structure.
標籤 | 描述 |
---|---|
EFAULT | ptr points outside the address space. |
EINVAL | ptr is 0, or func is 1 and bytecount is not equal to the size of the structure modify_ldt_ldt_s, or func is 1 and the new ldt entry has invalid values. |
ENOSYS | func is neither 0 nor 1. |