Commit 87113e80 authored by Qinghuang Feng's avatar Qinghuang Feng Committed by Linus Torvalds

fs/binfmt_misc.c: add terminating newline to /proc/sys/fs/binfmt_misc/status

The following is what it looks like before patching.
It is not much readable.

user@ubuntu:/proc/sys/fs/binfmt_misc$ cat status
enableduser@ubuntu:/proc/sys/fs/binfmt_misc$
Signed-off-by: default avatarQinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5cf0cc4e
...@@ -649,7 +649,7 @@ static const struct file_operations bm_register_operations = { ...@@ -649,7 +649,7 @@ static const struct file_operations bm_register_operations = {
static ssize_t static ssize_t
bm_status_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) bm_status_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
{ {
char *s = enabled ? "enabled" : "disabled"; char *s = enabled ? "enabled\n" : "disabled\n";
return simple_read_from_buffer(buf, nbytes, ppos, s, strlen(s)); return simple_read_from_buffer(buf, nbytes, ppos, s, strlen(s));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment