Function report |
Source Code:lib\strncpy_from_user.c |
Create Date:2022-07-28 07:20:08 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Do a strncpy, return length of string without final '\0'.* 'count' is the user-supplied count (return 'count' if we* hit it), 'max' is the address space maximum (and we return* -EFAULT if we hit it).
Proto:static inline long do_strncpy_from_user(char *dst, const char __user *src, unsigned long count, unsigned long max)
Type:long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| char * | dst | |
| const char __user * | src | |
| unsigned long | count | |
| unsigned long | max |
| 31 | res = 0 |
| 33 | If IS_UNALIGNED(src, dst) Then Go to byte_at_a_time |
| 40 | unsafe_get_user(c, (unsignedlong__user * )(src + res), byte_at_a_time) |
| 43 | If Return nonzero if it has a zero Then |
| 44 | data = prep_zero_mask(c, data, & constants) |
| 45 | data = create_zero_mask(data) |
| 52 | byte_at_a_time : |
| 75 | efault : |
| 76 | Return -EFAULT |
| Name | Describe |
|---|---|
| strncpy_from_user | Copy a NUL terminated string from userspace |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |