summaryrefslogtreecommitdiffstats
path: root/libcgroup.map
Commit message (Collapse)AuthorAgeFilesLines
* Feature: Provide new libcgroup walk tree APIDhaval Giani2009-02-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: Balbir Singh <balbir@linux.vnet.ibm.com> Changelog v3..v4 1. Add _end() method for the iterator Changelog v3..v2 1. Move to iterator based design Changelog v2..v1 1. Add base path and depth semantics for walking This patch adds the capability to walk cgroups by providing a new API called cgroup_walk_tree. The API accepts the controller to walk and the order in which the directories and files must be visited. The code is implemented as an iterator, the begin function starts the walk and we have depth control. The next function gets the following node and returns ECGEOF when done. libcgroup.map has been updated to reflect the same change and the prototype is exported in libcgroup.h. I've also added test cases (tests/walk_test.c). Sample output is show root is /cgroup/cpu/// path , parent , relative /, full /cgroup/cpu/// path l3, parent , relative /l3, full /cgroup/cpu///l3 path ll1, parent l3, relative /l3/ll1, full /cgroup/cpu///l3/ll1 path lll1, parent ll1, relative /l3/ll1/lll1, full /cgroup/cpu///l3/ll1/lll1 path l2, parent , relative /l2, full /cgroup/cpu///l2 path ll1, parent l2, relative /l2/ll1, full /cgroup/cpu///l2/ll1 path lll1, parent ll1, relative /l2/ll1/lll1, full /cgroup/cpu///l2/ll1/lll1 path l1, parent , relative /l1, full /cgroup/cpu///l1 path ll1, parent l1, relative /l1/ll1, full /cgroup/cpu///l1/ll1 path lll1, parent ll1, relative /l1/ll1/lll1, full /cgroup/cpu///l1/ll1/lll1 path a, parent , relative /a, full /cgroup/cpu///a path e, parent a, relative /a/e, full /cgroup/cpu///a/e path f, parent e, relative /a/e/f, full /cgroup/cpu///a/e/f path f, parent a, relative /a/f, full /cgroup/cpu///a/f path x, parent a, relative /a/x, full /cgroup/cpu///a/x path b, parent a, relative /a/b, full /cgroup/cpu///a/b path c, parent b, relative /a/b/c, full /cgroup/cpu///a/b/c path d, parent c, relative /a/b/c/d, full /cgroup/cpu///a/b/c/d path default, parent , relative /default, full /cgroup/cpu///default root is /cgroup/cpu//a/ path , parent , relative /, full /cgroup/cpu//a/ path e, parent , relative /e, full /cgroup/cpu//a/e path f, parent e, relative /e/f, full /cgroup/cpu//a/e/f path f, parent , relative /f, full /cgroup/cpu//a/f path x, parent , relative /x, full /cgroup/cpu//a/x path b, parent , relative /b, full /cgroup/cpu//a/b path c, parent b, relative /b/c, full /cgroup/cpu//a/b/c Walking the first 5 nodes root is /cgroup/cpu/// path , parent , relative /, full /cgroup/cpu/// path l3, parent , relative /l3, full /cgroup/cpu///l3 path ll1, parent l3, relative /l3/ll1, full /cgroup/cpu///l3/ll1 path lll1, parent ll1, relative /l3/ll1/lll1, full /cgroup/cpu///l3/ll1/lll1 NOTE: Parent directory is represented by an empty (not NULL) string "". The length of the string is 0. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@356 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* This patch store the last errno value to last_errno value and addBalbir Singh2009-02-161-0/+6
| | | | | | | | | | | | cgroup_add_last_errno procedure to show this number. Use this procedure to show the cause of the error when ECGOTHER is returned. [balbir@linux.vnet.ibm.com: fix last_errno in config.c] Signed-off-by: Ivana Varekova <varekova@redhat.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@329 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Better error reporting for libcgroupDhaval Giani2008-12-091-0/+5
| | | | | | | | | | | | | | | | From: Ankita Garg <ankita@in.ibm.com> This patch adds human readable error messages to the configuration parser. The error lookup is implemented as a simple table, indexed by the error. TODO: Save errno at ECGOTHER and pass it down as cgroup_lasterror. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Ankita Garg <ankita@in.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@228 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: ABI guaranteeDhaval Giani2008-09-301-0/+42
From: Balbir Singh <balbir@linux.vnet.ibm.com> Versioning all the symbols, in order to provide ABI guarantee. Bringing Balbir's patch up to date, and changing the version to 0.32. Please review. [dhaval@linux.vnet.ibm.com: updated with latest symbols] Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@203 4f4bb910-9a46-0410-90c8-c897d4f1cd53