Lines Matching defs:count
65 long strncpy_from_kernel_nofault(char *dst, const void *unsafe_addr, long count)
69 if (unlikely(count <= 0))
71 if (!copy_from_kernel_nofault_allowed(unsafe_addr, count))
79 } while (dst[-1] && src - unsafe_addr < count);
155 * least @count bytes long.
157 * @count: Maximum number of bytes to copy, including the trailing NUL.
167 * If @count is smaller than the length of the string, copies @count-1 bytes,
168 * sets the last byte of @dst buffer to NUL and returns @count.
170 long strncpy_from_kernel_nofault(char *dst, const void *unsafe_addr, long count)
176 if (unlikely(count <= 0))
178 if (!copy_from_kernel_nofault_allowed(unsafe_addr, count))
186 } while (dst[-1] && ret == 0 && src - unsafe_addr < count);
254 * least @count bytes long.
256 * @count: Maximum number of bytes to copy, including the trailing NUL.
265 * If @count is smaller than the length of the string, copies @count-1 bytes,
266 * sets the last byte of @dst buffer to NUL and returns @count.
269 long count)
274 if (unlikely(count <= 0))
279 ret = strncpy_from_user(dst, unsafe_addr, count);
283 if (ret >= count) {
284 ret = count;
296 * @count: Maximum count (including NUL)
302 * If the string is too long, returns a number larger than @count. User
303 * has to check the return value against "> count".
304 * On exception (or invalid count), returns 0.
309 long strnlen_user_nofault(const void __user *unsafe_addr, long count)
316 ret = strnlen_user(unsafe_addr, count);