Copies a character string (including the terminating null character) from user to kernel space.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/uio.h>
int copyinstr (from, to, max, actual)
caddr_t from;
caddr_t to;
uint max;
uint *actual;
int copyinstr (from, to, max, actual)
void *from;
void *to;
size_t max;
size_t *actual;
Item | Description |
---|---|
from | Specifies the address of the character string to copy. |
to | Specifies the address to which the character string is to be copied. |
max | Specifies the number of characters to be copied. |
actual | Specifies a parameter, passed by reference, that is updated by the copyinstr service with the actual number of characters copied. |
The copyinstr kernel service permits a user to copy character data from one location to another. The source location must be in user space or can be in kernel space if the caller is a kernel process. The destination is in kernel space.
The copyinstr kernel service can be called from the process environment only.
Item | Description |
---|---|
0 | Indicates a successful operation. |
E2BIG | Indicates insufficient space to complete the copy. |
EIO | Indicates that a permanent I/O error occurred while referencing data. |
ENOSPC | Indicates insufficient file system or paging space. |
EFAULT | Indicates that the user has insufficient authority to access the data or the address specified in the uaddr parameter is not valid. |