| * Copy to/from userspace with optional address space checking. |
| * Copyright 2004-2006 Atmel Corporation |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| #include <asm/thread_info.h> |
| * long strncpy_from_user(char *dst, const char *src, long count) |
| * On success, returns the length of the string, not including |
| * If the string is longer than count, returns count |
| * If userspace access fails, returns -EFAULT |
| .global strncpy_from_user |
| .type strncpy_from_user, "function" |
| branch_if_kernel r8, __strncpy_from_user |
| ret_if_privileged r8, r11, r10, r9 |
| .global __strncpy_from_user |
| .type __strncpy_from_user, "function" |