summaryrefslogtreecommitdiffstats
path: root/runtime/copy.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-04-07 21:48:47 +0000
committerhunt <hunt>2005-04-07 21:48:47 +0000
commit655ee2825121e149a9976e562946892efb20aea1 (patch)
tree91b9b4cc46aeee50e9d789689bea0b96e11ceba1 /runtime/copy.c
parent3d4bc8bea6b45893bd4b49f44df26bd602b4cba5 (diff)
downloadsystemtap-steved-655ee2825121e149a9976e562946892efb20aea1.tar.gz
systemtap-steved-655ee2825121e149a9976e562946892efb20aea1.tar.xz
systemtap-steved-655ee2825121e149a9976e562946892efb20aea1.zip
*** empty log message ***
Diffstat (limited to 'runtime/copy.c')
-rw-r--r--runtime/copy.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/copy.c b/runtime/copy.c
index 6e2313f6..ef5f094d 100644
--- a/runtime/copy.c
+++ b/runtime/copy.c
@@ -89,6 +89,7 @@ do { \
*
* If <i>count</i> is smaller than the length of the string, copies
* <i>count</i> bytes and returns <i>count</i>.
+ * @deprecated I can't think of why you wouldn't use _stp_string_from_user() instead.
*/
long
@@ -99,6 +100,16 @@ _stp_strncpy_from_user(char *dst, const char __user *src, long count)
return res;
}
+/** Copy a String from userspace.
+ * Copies a string of up to \e count bytes from userspace into a String.
+ * If access to userspace fails, returns -EFAULT (some data may have been
+ * copied).
+ * @param str Destination String.
+ * @param src Source address, in user space.
+ * @param count Maximum number of bytes to copy, including the trailing NULL.
+ *
+ */
+
void _stp_string_from_user (String str, const char __user *src, long count)
{
long res;
@@ -124,7 +135,7 @@ void _stp_string_from_user (String str, const char __user *src, long count)
*
*/
-unsigned long inline
+unsigned long
_stp_copy_from_user (char *dst, const char __user *src, unsigned long count)
{
return __copy_from_user_inatomic(dst, src, count);