projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42b16c0
)
[PATCH] SYSFS: fix PAGE_SIZE check
author
Jon Smirl
<jonsmirl@gmail.com>
Tue, 14 Jun 2005 13:54:54 +0000
(09:54 -0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 20 Jun 2005 22:15:38 +0000
(15:15 -0700)
Without this change I can't set an attribute exactly PAGE_SIZE in
length. There is no need for zero termination because the interface
uses lengths.
From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/sysfs/file.c
b/fs/sysfs/file.c
index 1481cae7d99ad0b882f27b610bb7326c3c4d41c8..849aac115460812ff419898c45346b353da9bb5c 100644
(file)
--- a/
fs/sysfs/file.c
+++ b/
fs/sysfs/file.c
@@
-182,7
+182,7
@@
fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t
return -ENOMEM;
if (count >= PAGE_SIZE)
- count = PAGE_SIZE
- 1
;
+ count = PAGE_SIZE;
error = copy_from_user(buffer->page,buf,count);
buffer->needs_read_fill = 1;
return error ? -EFAULT : count;