stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Chengguang Xu <cgxu519@gmx.com>
Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/2] chardev: showing minor range for chardev in the output of /proc/devices
Date: Tue, 12 Feb 2019 10:02:12 +0100	[thread overview]
Message-ID: <20190212090212.GE31657@kroah.com> (raw)
In-Reply-To: <20190212084739.27602-2-cgxu519@gmx.com>

On Tue, Feb 12, 2019 at 04:47:39PM +0800, Chengguang Xu wrote:
> Currently chardev allows to share major, showing
> major with minor range for chardev will be more
> helpful.
> 
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
> ---
>  fs/char_dev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/char_dev.c b/fs/char_dev.c
> index b25b1da097d5..6f00acdeb308 100644
> --- a/fs/char_dev.c
> +++ b/fs/char_dev.c
> @@ -55,7 +55,9 @@ void chrdev_show(struct seq_file *f, off_t offset)
>  	mutex_lock(&chrdevs_lock);
>  	for (cd = chrdevs[major_to_index(offset)]; cd; cd = cd->next) {
>  		if (cd->major == offset)
> -			seq_printf(f, "%3d %s\n", cd->major, cd->name);
> +			seq_printf(f, "%3d %s (%u-%u)\n", cd->major, cd->name,
> +				   cd->baseminor,
> +				   cd->baseminor + cd->minorct - 1);

You are changing the format of a userspace file, what tools are going to
break when you do this?

thanks,

greg k-h

  reply	other threads:[~2019-02-12  9:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  8:47 [PATCH 1/2] chardev: fix an overlap misjudgement case in __register_chrdev_region() Chengguang Xu
2019-02-12  8:47 ` [PATCH 2/2] chardev: showing minor range for chardev in the output of /proc/devices Chengguang Xu
2019-02-12  9:02   ` Greg KH [this message]
2019-02-12 15:18     ` cgxu519
2019-02-12 15:20       ` Greg KH
2019-02-12 15:41         ` cgxu519
2019-02-12 18:32           ` Greg KH
2019-02-12  9:01 ` [PATCH 1/2] chardev: fix an overlap misjudgement case in __register_chrdev_region() Greg KH

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=20190212090212.GE31657@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=cgxu519@gmx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --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).