]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
add test for empty controller/variable stack
authorIvana Hutarova Varekova <varekova@redhat.com>
Thu, 2 Sep 2010 10:17:21 +0000 (12:17 +0200)
committerJan Safranek <jsafrane@redhat.com>
Fri, 17 Sep 2010 08:07:24 +0000 (10:07 +0200)
add test for empty controller/variable stack

Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
doc/man/cgget.1
src/tools/cgget.c

index f02fbbad64e4e0531f2dfdde54744075a77d6aca..543f7f2f41806e2e8055b503d50e752a4474adc5 100644 (file)
@@ -12,6 +12,8 @@ cgget \- print parameter(s) of given group(s)
 
 .SH DESCRIPTION
 The command prints the parameter(s) of input cgroup(s).
+If there is not set any controller or variable,
+then values of all possible variables are displayed.
 
 .TP
 .B <path>
index de1a7dc102b381609adc0bf45d7c326e3679dbdb..433e3b678026cabaa7ee385a7cf2ef858993558f 100644 (file)
@@ -321,6 +321,13 @@ int main(int argc, char *argv[])
                goto err;
        }
 
+       /*
+        * if no controller or variable is set
+        * then show values of all possible variables
+        */
+       if ((c_number == 0) && (n_number == 0))
+               mode |=  MODE_SHOW_ALL_CONTROLLERS;
+
        /* Initialize libcgroup. */
        ret = cgroup_init();
        if (ret) {