diff options
author | hunt <hunt> | 2006-07-11 20:37:18 +0000 |
---|---|---|
committer | hunt <hunt> | 2006-07-11 20:37:18 +0000 |
commit | 6d66b0c445045e559c2b7eaf9a6931e24a90cc6a (patch) | |
tree | 7443aaddff17081f971208b04c33171c44642fc3 /runtime/copy.c | |
parent | 7813b63f5f737c9d4e47142d690966651ed8678b (diff) | |
download | systemtap-steved-6d66b0c445045e559c2b7eaf9a6931e24a90cc6a.tar.gz systemtap-steved-6d66b0c445045e559c2b7eaf9a6931e24a90cc6a.tar.xz systemtap-steved-6d66b0c445045e559c2b7eaf9a6931e24a90cc6a.zip |
2006-07-11 Martin Hunt <hunt@redhat.com>
* string.c (_stp_text_str): Add a parameter to support
userspace strings too.
* string.h: (_stp_text_str): Fix proto.
Diffstat (limited to 'runtime/copy.c')
-rw-r--r-- | runtime/copy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/copy.c b/runtime/copy.c index 75a185c4..f4d906b3 100644 --- a/runtime/copy.c +++ b/runtime/copy.c @@ -124,7 +124,7 @@ _stp_strncpy_from_user(char *dst, const char __user *src, long count) * */ -void _stp_string_from_user (String str, const char __user *src, long count) +long _stp_string_from_user (String str, const char __user *src, long count) { long res = -EFAULT; if (count > STP_STRING_SIZE - str->len - 1) @@ -136,6 +136,7 @@ void _stp_string_from_user (String str, const char __user *src, long count) str->buf[str->len] = '\0'; } } + return res; } /** Copy a block of data from user space. |