[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
copyinstr Kernel Service
Purpose
Copies a character string (including the terminating
null character) from user to kernel space.
Syntax
#include <sys/types.h>
#include <sys/errno.h>
int copyinstr
(from, to, max, actual)
caddt_t from;
caddt_t to;
uint max;
uint * actual;
Parameters
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. |
Description
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.
Execution Environment
The copyinstr kernel service
can be called from the process environment only.
Return Values
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. |
Related Information
Accessing User-Mode Data
While in Kernel Mode and Memory Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]