Index Index for
Section 9r
Index Alphabetical
listing for C
Bottom of page Bottom of
page

copyoutstr(9r)

NAME

copyoutstr - General: Copies a null-terminated string from a kernel address space to a user address space

SYNOPSIS

int copyoutstr( char *kernel_src, char *user_dest, int maxlength, int *lencopied );

ARGUMENTS

kernel_src Specifies the address in kernel space of the null-terminated string to be copied. user_dest Specifies the address in user space to copy the null-terminated string to. maxlength Specifies the maximum number of bytes to copy. lencopied Specifies the actual length of the string copied.

DESCRIPTION

The copyoutstr routine copies a specified null-terminated string from the protected kernel address space to the unprotected user address space.

CAUTIONS

If the string being copied is not null-terminated, copyoutstr copies maxlength bytes into the user address space.

RETURN VALUES

Upon successful completion, copyoutstr returns the value 0 (zero) and the actual length of the string copied in lencopied. Otherwise, it can return the following errors: EFAULT The address in kernel space that you specified in the kernel_src argument cannot be accessed. ENAMETOOLONG The length of the string exceeds the maxlength value.

SEE ALSO

Routines: copyinstr(9r)

Index Index for
Section 9r
Index Alphabetical
listing for C
Top of page Top of
page