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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A4DC358.7030900@cn.fujitsu.com>
Date:	Fri, 03 Jul 2009 16:37:44 +0800
From:	Gui Jianfeng <guijianfeng@...fujitsu.com>
To:	Li Zefan <lizf@...fujitsu.com>
CC:	Paul Menage <menage@...gle.com>, linux-kernel@...r.kernel.org,
	Linux Containers <containers@...ts.linux-foundation.org>
Subject: Re: [PATCH] cgroup: Fix indent for /proc/cgroups

Li Zefan wrote:
> 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..

  Yeap, but there isn't such a case at least by now.

> 
>> Signed-off-by: Gui Jianfeng <guijianfeng@...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);
>>  	}
> 
> 
> 
> 

-- 
Regards
Gui Jianfeng

--
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