summaryrefslogtreecommitdiffstats
path: root/src/libcgroup.map
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2009-07-28 16:08:36 +0200
committerJan Safranek <jsafrane@redhat.com>2009-07-28 16:08:36 +0200
commit4b198940a8d38da33581ea2eef7c8b05ee103257 (patch)
tree9849984923c26476c56cc0b775555d45df2f6562 /src/libcgroup.map
parentb75a9fcfab5cd2ae88a55934e22c77cbd6810a14 (diff)
downloadlibcg-4b198940a8d38da33581ea2eef7c8b05ee103257.tar.gz
libcg-4b198940a8d38da33581ea2eef7c8b05ee103257.tar.xz
libcg-4b198940a8d38da33581ea2eef7c8b05ee103257.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>
Diffstat (limited to 'src/libcgroup.map')
0 files changed, 0 insertions, 0 deletions