projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
129e951
)
proc: fix make cmdline writable for amlogic-4.9
author
adamg
<adamg88@users.noreply.github.com>
Tue, 25 Jun 2019 04:51:02 +0000
(
05:51
+0100)
committer
Nick Xie
<nick@khadas.com>
Fri, 12 Jul 2019 05:37:14 +0000
(13:37 +0800)
fs/proc/cmdline.c
patch
|
blob
|
history
diff --git
a/fs/proc/cmdline.c
b/fs/proc/cmdline.c
index
24cb197
..
1e8f919
100644
(file)
--- a/
fs/proc/cmdline.c
+++ b/
fs/proc/cmdline.c
@@
-19,7
+19,7
@@
static int cmdline_proc_open(struct inode *inode, struct file *file)
return single_open(file, cmdline_proc_show, NULL);
}
-static
in
t cmdline_proc_write(struct file *file, const char __user *buf,
+static
ssize_
t cmdline_proc_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{
char str[COMMAND_LINE_SIZE];
@@
-28,7
+28,7
@@
static int cmdline_proc_write(struct file *file, const char __user *buf,
return -EFAULT;
}
str[len] = '\0';
- strlcpy(proc_cmdline, str, min(
(int)
len, COMMAND_LINE_SIZE));
+ strlcpy(proc_cmdline, str, min(len, COMMAND_LINE_SIZE));
return len;
}