From: Li Zefan <lizf@cn.fujitsu.com>
To: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>,
linux-kernel@vger.kernel.org,
Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] cgroup: Fix indent for /proc/cgroups
Date: Fri, 03 Jul 2009 16:20:32 +0800 [thread overview]
Message-ID: <4A4DBF50.8090408@cn.fujitsu.com> (raw)
In-Reply-To: <4A4DBBC2.8010805@cn.fujitsu.com>
CC: container list
Gui Jianfeng wrote:
> Currently, /proc/cgroups outputs is fairly ugly as following,
> #subsys_name hierarchy num_cgroups enabled
> cpuset 0 1 1
> debug 0 1 1
> ns 0 1 1
>
> indent it in a good-looking way.
> #subsys_name hierarchy num_cgroups enabled
> cpuset 0 1 1
> debug 0 1 1
> ns 0 1 1
>
But if there's a subsystem with name length >= 8,
it won't be aligned properly..
>
> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
> ---
> kernel/cgroup.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 3737a68..99fc160 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -2963,7 +2963,7 @@ static int proc_cgroupstats_show(struct seq_file *m, void *v)
> mutex_lock(&cgroup_mutex);
> for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
> struct cgroup_subsys *ss = subsys[i];
> - seq_printf(m, "%s\t%lu\t%d\t%d\n",
> + seq_printf(m, "%s\t\t%lu\t\t%d\t\t%d\n",
> ss->name, ss->root->subsys_bits,
> ss->root->number_of_cgroups, !ss->disabled);
> }
next prev parent reply other threads:[~2009-07-03 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 8:05 [PATCH] cgroup: Fix indent for /proc/cgroups Gui Jianfeng
2009-07-03 8:20 ` Li Zefan [this message]
2009-07-03 8:37 ` Gui Jianfeng
2009-07-03 8:43 ` Li Zefan
2009-07-03 9:00 ` Gui Jianfeng
2009-07-03 15:37 ` Paul Menage
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=4A4DBF50.8090408@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=containers@lists.linux-foundation.org \
--cc=guijianfeng@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
/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