linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Qinghuang Feng <qhfeng.kernel@gmail.com>
Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org, qhfeng.kernel@gmail.com
Subject: Re: [PATCH] fs/binfmt_misc.c: let binfmt status be more readable
Date: Tue, 18 Nov 2008 16:36:20 -0800	[thread overview]
Message-ID: <20081118163620.de14c1ec.akpm@linux-foundation.org> (raw)
In-Reply-To: <49211f7b.09876e0a.012d.079f@mx.google.com>

On Mon, 17 Nov 2008 15:38:16 +0800
Qinghuang Feng <qhfeng.kernel@gmail.com> wrote:

> 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: Qinghuang Feng <qhfeng.kernel@gmail.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));
>  }

Well.  That's a bugfix, really.

It fixes a bug which has been there for a very long time, in a way
which is non-backward-compatible.

Are there existing applications out there which will disastrously fail
if we add a newline to the /proc/sys/fs/binfmt_misc/status contents?  I
somehow doubt it.  But we shall find out :)




      reply	other threads:[~2008-11-19  0:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17  7:38 [PATCH] fs/binfmt_misc.c: let binfmt status be more readable Qinghuang Feng
2008-11-19  0:36 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081118163620.de14c1ec.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qhfeng.kernel@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).