]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
lssubsys patch - adds omit controllers
authorIvana Hutarova Varekova <varekova@redhat.com>
Tue, 10 Aug 2010 07:58:13 +0000 (13:28 +0530)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Tue, 10 Aug 2010 07:58:13 +0000 (13:28 +0530)
commit17ccb6419a4994041964c645a497ef7b97ea42c4
tree0aa33e26ac3c1893e1ef744fb84674588c6e3a71
parentbe13bad0e41d8debde1e0c3c3345ee1f5158b72f
lssubsys patch - adds omit controllers

Changes from previous version:
* put the return value check to separate subpackages
* change the test (info.hierarchy == hierarchy) to
 (info.hierarchy != hierarchy) to decrease the nesting depth
* use memset

This patch fixes lssubsys output - it fixes two problems:
1/ if there was subsystem attached to not-mounted hierarchy then
lssubsys -a
does not show this subsystems
EXAMPLE:

BROKEN:
$ ./lssubsys -am
cpuset
cpuacct /cgroup/memoryd
memory /cgroup/memory
freezer
net_cls /cgroup/net_cls

FIXED:
$ ./lssubsys -am
cpuset
ns <- controller is in hierarchy but it is not mounted
cpu,devices <- controller is in hierarchy but it is not mounted
cpuacct /cgroup/memoryd
memory /cgroup/memory
freezer
net_cls /cgroup/net_cls

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-By: Jan Safranek <jsafrane@redhat.com>
src/tools/lssubsys.c