Query: copyinstr
OS: osf1
Section: 9r
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
copyinstr(9r) copyinstr(9r)NAMEcopyinstr - General: Copies a null-terminated string from a user address space to a kernel address spaceSYNOPSISint copyinstr( char *user_src, char *kernel_dest, int maxlength, int *lencopied );ARGUMENTSSpecifies the address in user space of the null-terminated string to be copied. Specifies the address in kernel space to copy the null- terminated string to. Specifies the maximum number of bytes to copy. Specifies the actual length of the string copied.DESCRIPTIONThe copyinstr routine copies a specified null-terminated string from the unprotected user address space to a specified address in the pro- tected kernel address space.CAUTIONSIf the string being copied is not null terminated, copyinstr copies maxlength bytes into the kernel address space.RETURN VALUESUpon successful completion, copyinstr returns the value 0 (zero) and the actual length of the string copied to the lencopied argument. Oth- erwise, it returns one of the following error constants defined in /usr/sys/include/sys/errno.h: The address in user space that you speci- fied in the user_src argument cannot be accessed. The length of the string exceeds the maxlength value.SEE ALSORoutines: copyoutstr(9r) copyinstr(9r)