cgsnapshot: don't display mountpoints which are not wanted
the first version of this patch was created by Libo Chen <clbchenlibo.chen@...>
see http://sourceforge.net/p/libcg/mailman/libcg-devel/thread/
51FB6459.
9000307%40huawei.com/#msg31243958
before patch:
#lscgroup
cpu:/
cpuset:/
#cgsnapshot -s cpu
mount {
cpuset = /cgroup/cpuacct;
cpu = /cgroup/cpu;
}
We just wanted to save cpu controller, so cpuset was unexpected
Changelog:
* parse controller list only if the list is set, if there is no restriction display all hierarchies
* parse named list as well, thus they are not output if they are not wanted
* remove TODO comment
Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Reported-by: Libo Chen <clbchenlibo.chen@...>
Acked-by: Jan Safranek <jsafrane@redhat.com>