1STRNCPY_FROM_USER(9)      Memory Management in Linux      STRNCPY_FROM_USER(9)
2
3
4

NAME

6       strncpy_from_user - Copy a NUL terminated string from userspace.
7

SYNOPSIS

9       long strncpy_from_user(char * dst, const char __user * src,
10                              long count);
11

ARGUMENTS

13       dst
14           Destination address, in kernel space. This buffer must be at least
15           count bytes long.
16
17       src
18           Source address, in user space.
19
20       count
21           Maximum number of bytes to copy, including the trailing NUL.
22

DESCRIPTION

24       Copies a NUL-terminated string from userspace to kernel space.
25
26       On success, returns the length of the string (not including the
27       trailing NUL).
28
29       If access to userspace fails, returns -EFAULT (some data may have been
30       copied).
31
32       If count is smaller than the length of the string, copies count bytes
33       and returns count.
34
36Kernel Hackers Manual 2.6.       November 2011            STRNCPY_FROM_USER(9)
Impressum