Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b711909d
Commit
b711909d
authored
Mar 23, 2003
by
Alan Cox
Committed by
Linus Torvalds
Mar 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] remove NUL v NULL confusion
parent
53945296
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
arch/i386/lib/usercopy.c
arch/i386/lib/usercopy.c
+10
-10
No files found.
arch/i386/lib/usercopy.c
View file @
b711909d
...
...
@@ -51,18 +51,18 @@ do { \
} while (0)
/**
* __strncpy_from_user: - Copy a NUL
L
terminated string from userspace, with less checking.
* __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking.
* @dst: Destination address, in kernel space. This buffer must be at
* least @count bytes long.
* @src: Source address, in user space.
* @count: Maximum number of bytes to copy, including the trailing NUL
L
.
* @count: Maximum number of bytes to copy, including the trailing NUL.
*
* Copies a NUL
L
-terminated string from userspace to kernel space.
* Copies a NUL-terminated string from userspace to kernel space.
* Caller must check the specified block with access_ok() before calling
* this function.
*
* On success, returns the length of the string (not including the trailing
* NUL
L
).
* NUL).
*
* If access to userspace fails, returns -EFAULT (some data may have been
* copied).
...
...
@@ -79,16 +79,16 @@ __strncpy_from_user(char *dst, const char *src, long count)
}
/**
* strncpy_from_user: - Copy a NUL
L
terminated string from userspace.
* strncpy_from_user: - Copy a NUL terminated string from userspace.
* @dst: Destination address, in kernel space. This buffer must be at
* least @count bytes long.
* @src: Source address, in user space.
* @count: Maximum number of bytes to copy, including the trailing NUL
L
.
* @count: Maximum number of bytes to copy, including the trailing NUL.
*
* Copies a NUL
L
-terminated string from userspace to kernel space.
* Copies a NUL-terminated string from userspace to kernel space.
*
* On success, returns the length of the string (not including the trailing
* NUL
L
).
* NUL).
*
* If access to userspace fails, returns -EFAULT (some data may have been
* copied).
...
...
@@ -172,9 +172,9 @@ __clear_user(void *to, unsigned long n)
* @s: The string to measure.
* @n: The maximum valid length
*
* Get the size of a NUL
L
-terminated string in user space.
* Get the size of a NUL-terminated string in user space.
*
* Returns the size of the string INCLUDING the terminating NUL
L
.
* Returns the size of the string INCLUDING the terminating NUL.
* On exception, returns 0.
* If the string is too long, returns a value greater than @n.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment