]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
cgsnapshot: don't display mountpoints which are not wanted
authorIvana Hutarova Varekova <varekova@redhat.com>
Mon, 2 Sep 2013 11:49:35 +0000 (13:49 +0200)
committerIvana Hutarova Varekova <varekova@redhat.com>
Mon, 2 Sep 2013 11:49:35 +0000 (13:49 +0200)
commit66d09a0941bf5cf73fdd56f696b35241b85faf49
tree3595f9c819786c37fa4bf2e815a1a4d27b4366f8
parentb05c4c0e2207eaab463e752132eeec59e78da4da
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>
src/tools/cgsnapshot.c