On Thu, Jun 23, 2011 at 6:22 AM, Kevin Constantine <kevin.constant...@disneyanimation.com> wrote: > I apologize if this isn't the right list to ask questions. I wasn't > able to find a libcg-users list. >
This is the right place to ask > > I want to walk down the tree of cgroups, and if I see one that I > recognize, I want to delete it. In order to use cgroup_delete_cgroup(), > I need a cgroup struct. I can't seem to create a cgroup struct from any > of the information returned in a cgroup_file_info struct that I get back > from the cgroup_walk_tree function. > > Is there a way to get a cgroup struct from a cgroup_walk_tree() iteration? If you have the name, wouldn't cgroup_get_cgroup() give you what you want? Here is a general way I use it (and your question makes me wonder if I should do a better job of documenting it) 1. cgroup_new_cgroup followed by cgroup_get_cgroup() (given a name, get a filled struct cgroup) 2. If you want to set a value cgroup_new_cgroup(), then use wrappers to set the value and cgroup_modify_cgroup() I hope this helps, Balbir PS: We need a layer 2 API that should abstract these sort of problems ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel