lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <49211f7b.09876e0a.012d.079f@mx.google.com>
Date:	Mon, 17 Nov 2008 15:38:16 +0800
From:	Qinghuang Feng <qhfeng.kernel@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org, qhfeng.kernel@...il.com
Subject: [PATCH] fs/binfmt_misc.c: let binfmt status be more readable 

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

user@...ntu:/proc/sys/fs/binfmt_misc$ cat status 
enableduser@...ntu:/proc/sys/fs/binfmt_misc$

Signed-off-by: Qinghuang Feng <qhfeng.kernel@...il.com>
---
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index f2744ab..72e8b24 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -652,7 +652,7 @@ static const struct file_operations bm_register_operations = {
 static ssize_t
 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));
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ