summaryrefslogtreecommitdiffstats
path: root/tests/test_functions.c
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2009-07-28 16:20:25 +0200
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-08-06 11:51:34 +0530
commit8f9708390b12f8101851ddfeb49d37688a76a20b (patch)
tree04b23c926f5a1e488307e843fdfca61746030372 /tests/test_functions.c
parentcbe2321ec0e87095c5f2081fbc4a85bd5becfbb6 (diff)
downloadlibcg-8f9708390b12f8101851ddfeb49d37688a76a20b.tar.gz
libcg-8f9708390b12f8101851ddfeb49d37688a76a20b.tar.xz
libcg-8f9708390b12f8101851ddfeb49d37688a76a20b.zip
RFC: Fix cgroup_find_parent function
There are more issues with cgroup_find_parent function: 1. The cgroup_find_parent expects, that it's argument is group in cg_mount_table[0] controller, which is not always the case. IMHO the function should accept complete struct cgroup and find real parent. 2. when checking the st_dev of the group and it's parent to prevent "underflow" to real filesystem, actually the parent and it's parent are checked instead of group and it's parent. In addition, I enhanced the function to return real error code when something goes wrong. Open question is, if the function should return just char* as parent's name or whole struct cgroup*. The second case is more natural - we should work with groups and not group names, but in some cases just the name is needed and whole cgroup creation would be unnecessary overhead (I have prepared cgcdelete tool, which needs just parent's name). Signed-off-by: Jan Safranek <jsafrane@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Diffstat (limited to 'tests/test_functions.c')
0 files changed, 0 insertions, 0 deletions