summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge the cgruleseng daemon from Steve OlivieriBalbir Singh2008-09-2612-196/+1906
| | | | | | | | | | Signed-off-by: Steve Olivieri <sjo@redhat.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@190 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Once we build the path, we don't have all the room in path anymore.Balbir Singh2008-09-201-2/+4
| | | | | | | | | | | | Instead of using sizeof(path), we should use FILENAME_MAX - strlen(path) - 1. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@186 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Fix a warning in api.c, where we ignore the fscanf value.Balbir Singh2008-09-201-1/+6
| | | | | | | | | | | I've tested the patch by running the tests available in the tests directory. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@185 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Check for NULL data structures in the wrappersDhaval Giani2008-09-051-0/+42
| | | | | | | | | | | Don't want to have a segmentation fault for NULL data structures. Just return an error to the caller. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@177 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Change variables to *printf/*scanf to use inttypes.hDhaval Giani2008-09-051-7/+7
| | | | | | | | | | | | | | | Instead of using %lu and so on, use the inttype.h macro to define types. Will ensure compatibility across platforms. Please review more closely. Tested by compiling with and without -m32 on a 64 bit system. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@176 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix makefile entry for cgclassifyDhaval Giani2008-09-051-4/+4
| | | | | | | | | | | | cgclassify depends on libcgroup.so. Ensure that the dependency is met. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@175 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix makefile entry for make cleanDhaval Giani2008-08-271-1/+1
| | | | | | | | | | | | | Don't know when this change happened, or got missed. Correcting it now. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@171 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: bump up version to 0.31Dhaval Giani2008-08-263-12/+17
| | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@169 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* More fixes to the earlier attempt to create new cgroup inheriting parent'sBalbir Singh2008-08-222-21/+80
| | | | | | | | | | | attributes. Test cases have also been updated. Tested on an x86_64 box with libcg_ba Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@166 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* This patch adds cgroup_create_cgroup_from_parent() API. I've tested itBalbir Singh2008-08-224-22/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with a modified version of libcg_ba (basic acceptance tests), that I'll send out later. I've also fixed a couple of bugs, I'll list them in order and if desired, I'll split out the patches so that the enhancements can be separate from the bug fixes 1. Fix cg_create_control_group() to succeed if the directory already exists 2. We can't always append a control_file, we need to open it "r+" 3. It's OK for writing values to a control_file to fail, since some of them are read-only and some may not exist in hierarchies below the root 4. Skip over directories while trying to read control file's name value pairs 5. In cg_rd_ctlr_file we don't allocate any memory to value, directly fscanf into it, that's been fixed 6. There might be more fixes that might already be present in trunk, since I hope I've not redone a lot of the fixes, I had branched of trunk very recently Changelog v2 ------------ 1. Refactor cgroup_free_controllers() and use it in cgroup_create_cgroup_from_parent() 2. Check for strdup failure 3. Check if dst == src TODO: 1. Use cg_add_controller() API 2. Use cg_add_value_string() API I'll send out patches for the TODOs later. I've also updated the basic acceptance test (libcg_ba.cpp) Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@165 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: A simple pam module (pam_cgroup.so) for task placement in right ↵Dhaval Giani2008-08-153-5/+188
| | | | | | | | | | | | | | | | | | | | | | | cgroup From: Vivek Goyal <vgoyal@redhat.com> o A simple pam module pam_cgroup for placement of tasks in right cgroup. Details are available in documentation. o This pam module will be included in libcgroup source and not in pam sources. o Copyright notice looks little odd as I copied the original copyright notice of pam_limits.c. Any suggestions for improvement are welcome. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@162 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup testcases: fix small testcase issueDhaval Giani2008-08-151-1/+1
| | | | | | | | | | | | | | From: Sudhir Kumar <skumar@linux.vnet.ibm.com> This patch fixes a small mistake in the testcase where we were comparing string values like integers. Signed-off-by: Sudhir Kumar <skumar@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@161 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Some cgexec cleanupsDhaval Giani2008-08-151-6/+2
| | | | | | | | | | | | From: Vivek Goyal <vgoyal@redhat.com> cgexec cleanup based on balbir's feedback. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@160 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Some libcgroup API cleanupsDhaval Giani2008-08-153-12/+15
| | | | | | | | | | | Various libcgroup api cleanups as suggested by balbir during code review Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@159 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add up missing scripts/samplesDhaval Giani2008-08-154-0/+209
| | | | | | | | | | | | | From: Balbir Singh <balbir@linux.vnet.ibm.com> Dhaval missed a few files while adding files to the reporsitory. Adding them in now. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@158 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Move trunk to v0.3Dhaval Giani2008-08-143-17/+26
| | | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@156 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix up Makefile.in so that we don't lose testsDhaval Giani2008-08-141-0/+3
| | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@155 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix cgroup_fill_cgc()Dhaval Giani2008-08-141-1/+1
| | | | | | | | | | | We were failing on stat's success. Stupid thing to do really. Fixing that now. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@154 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix return values in cgroup_attach_valueDhaval Giani2008-08-141-0/+4
| | | | | | | | | | | cgroup_attach_task_pid() should return ECGROUPNOTEXIST when we get an ENOENT from glibc. This patch makes that correction Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@153 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Fix configuration assert when multiple controllers are enabledDhaval Giani2008-08-141-1/+1
| | | | | | | | | | | | | | | Since we support multiple controllers, asserting is no longer a good idea. TODO: Support other controllers, memory, cpu and cpuacct (possibly cpusets as well). Well, this code is obsolete and will be replaced by the newer cgroup API. 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@152 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: beautify strcpy in modify_cgroupDhaval Giani2008-08-141-5/+5
| | | | | | | | | The code looked ugly. De-uglyfy it. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@151 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix up some free errorsDhaval Giani2008-08-141-3/+3
| | | | | | | | | | | | | | Sudhir reported a free() issue, it got traced to this issue. https://sourceforge.net/tracker/index.php?func=detail&aid=2049822&group_id=218421&atid=1043649 Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@150 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add a mktarball-trunk scriptDhaval Giani2008-08-141-0/+36
| | | | | | | | | | This script allows a tarball of the current trunk to be generated. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@147 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix cgroup_modify_cgroupDhaval Giani2008-08-141-3/+5
| | | | | | | | | | | | An almost unused and less tested API. The path was getting misformed. This was because it had not been set in the first place. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@146 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix the delete APIDhaval Giani2008-08-141-0/+5
| | | | | | | | | | | | | | | | The delete call was returning a wrong value even on success. The reason was because in the fallback path, we try to delete all the groups again. Now it is possible that a group might have already been deleted and we return a wrong value. Change the API to check if the group exists before trying to rmdir it in the error path. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@145 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Ensure null is returned if cgroup does not exist in ↵Dhaval Giani2008-08-141-0/+4
| | | | | | | | | | cgroup_get_cgroup() Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@143 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: zero out allocated memoryDhaval Giani2008-08-141-27/+25
| | | | | | | | | | | | | Use calloc to allocate memory. Should get rid of a number of silent memory corruptions. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Dan Smith <danms@us.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@142 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Sample configuration filesDhaval Giani2008-08-141-7/+27
| | | | | | | | | | | | From: Balbir Singh <balbir@linux.vnet.ibm.com> Dhaval forgot to add these files while merging the code. Merging them in now. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@140 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Change compiler to GCCDhaval Giani2008-08-142-2/+2
| | | | | | | | | | For some reason these changes got lost. Making the change again. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@139 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* cgclassify: A command line tool to classify/re-classify already running taskDhaval Giani2008-08-132-3/+156
| | | | | | | | | | | | | | | | | | | | | | | From: Vivek Goyal <vgoyal@redhat.com> o cgclassify, a command line tool to put a list of pids to the right cgroup based on rules in /etc/cgrules.conf. It can be mainly used for reclassification of tasks which are already running. Can think of two use cases. - During initial bootup, after cgroups are mounted, one needs to move tasks (started beofore cgroups were mounted) into right cgroup. - Once can choose to reclassify the tasks if admin has changed the rules and thinks a group of tasks should reclassified based on new rules. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@138 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* cgexec: A command line tool to execute a task in a cgroupDhaval Giani2008-08-132-3/+201
| | | | | | | | | | | | | | From: Vivek Goyal <vgoyal@redhat.com> o cgexec, a command line tool for placing the task in right cgroup in advance so that no help is needed from rules daemon and user can avoid delay in execution of rules. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@137 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: New API interfaces for task placementDhaval Giani2008-08-134-0/+404
| | | | | | | | | | | | | | | | | | | | | | | From: Vivek Goyal <vgoyal@redhat.com> Enhancement to libcg to do following. - Parse the /etc/cgrules.conf file and place the task in the right cgroup. - Exported two APIs which can place the task based on /etc/cgrules.conf or based on cgroup explicitly specified by the caller. - There can be multiple users. - PAM module (pam_cgroup) - cgexec tool - cgclassify tool - APIs can be directly used by other cgroup aware user progarams. - Classification daemon Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@136 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: documentationDhaval Giani2008-08-131-0/+168
| | | | | | | | Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@135 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Configuration and parsing updates (v2)Dhaval Giani2008-08-136-48/+58
| | | | | | | | | | | | | | | | | | | | | Dhaval, wanted a patch with -p1 generated so that he can apply it and use it with quilt. Here goes Testing Tested with samples/cgconfig.conf (NOTE: expects user balbir to be present on the system, feel free to change and test). TODO 1. Add hooks for other controllers, namely memory, cpuacct and cpuset 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@134 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: check for return code of fprintf()Dhaval Giani2008-08-131-4/+30
| | | | | | | | | | | | | | | | | From: Vivek Goyal <vgoyal@redhat.com> o Adding a task to a particular cgroup currently does fprintf() and never check the return code. Modify it to check for the return code in case fprintf() and fflush() did not succeed. o I ran into the issues when i can't add migration thread to /container/admingroup/tasks and it will fail silently. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@133 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix test cases to use new APIs.Dhaval Giani2008-08-131-2/+9
| | | | | | | | | | | | The APIs changed and we could no longer smoke test the library. Updating it now. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@132 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: update version details in trunk and tagsDhaval Giani2008-08-123-12/+16
| | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@131 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Change compiler to gcc in Makefile.inDhaval Giani2008-08-121-1/+1
| | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@128 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Extend cgroup_get_cgroup for uids as well.Dhaval Giani2008-08-121-3/+55
| | | | | | | | | | | | Now that a new API is available which allows a cgroup structure to be generated with just a name, extend cgroup_get_cgroup to get the uids and gids from the fs itself. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@127 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add cgroup_?et_value_* APIsDhaval Giani2008-08-122-0/+210
| | | | | | | | | | | | Adding in APIs which allow you to set and get values from a cgroup controller. Use cgroup_get_controller to get a controller, and then use cgroup_?et_value_* API for your requirement. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@126 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add API to get the cgroup from name (Breaks existing API)Dhaval Giani2008-08-122-9/+34
| | | | | | | | | | | | | | | This patch breaks API. There are no known users at the moment so it is fine. cgroup_new_cgroup now takes in only a name argument. The uids and gids are set by a new API, cgroup_?et_uid_gid() Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@125 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add an API to allow comparision of cgroupsDhaval Giani2008-08-122-0/+67
| | | | | | | | | | | Allows you to compare two cgroups. Their values need to be equal. NULL cgroups are invalid. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@124 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix the wrapper warningsDhaval Giani2008-08-091-2/+3
| | | | | | | | | | | | | | | | | Fixes the following warnings wrapper.c: In function ‘cgroup_add_value_int64’: wrapper.c:152: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int64_t’ wrapper.c:152: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int64_t’ wrapper.c: In function ‘cgroup_add_value_uint64’: wrapper.c:186: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u_int64_t’ wrapper.c:186: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u_int64_t’ Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@122 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix index values in cgroup_add_value_*Dhaval Giani2008-08-091-8/+4
| | | | | | | | | | | | | | | | There is a horrible bug in wrapper.c. The loop was causing a segmentation fault. This is because we were checking for index value as opposed to i. This bug was not hit before, because in all our testing, we were trying out only with CONFIG_FAIR_GROUP_SCHED and we were setting only one value inside the memory subsystem. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@121 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix segmentation fault in cgroup_init() -take2Dhaval Giani2008-08-091-2/+6
| | | | | | | | | | | | | | | | An artifact from the time when libcgroup could not handle multiple cgroup filesystems mounted at multiple points. It is very much possible a subsystem is not mounted at that point. (FWIW, it is wrong even on a single mount point, but I am quite surprised that no one hit it yet.) V1->V2 A minor cleanup possible. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@120 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: compile library using GCCDhaval Giani2008-08-091-1/+1
| | | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@119 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add new API to get cgroup data structure from filesystemDhaval Giani2008-08-062-0/+154
| | | | | | | | | | | | | | | | | New API to get the cgroup datastructure from the mounted filesystem. It accepts the cgroup datastructure with the name of the cgroup which has to populated across various mountpoints. TODO: More testing. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Dan Smith <danms@us.ibm.com> Cc: Paul Menage <menage@google.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@117 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Introduce new error code ECGOTHERDhaval Giani2008-07-291-0/+4
| | | | | | | | | | | | From: Vivek Goyal <vgoyal@redhat.com> Introduce new error code ECGOTHER Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@116 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Add more debug statementsDhaval Giani2008-07-291-4/+14
| | | | | | | | | | | | From: Vivek Goyal <vgoyal@redhat.com> o Add some more debug statements Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@115 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix up rentrant functions patch.Dhaval Giani2008-07-231-3/+17
| | | | | | | | | | Some errors were not handled, this patch handles those errors. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@114 4f4bb910-9a46-0410-90c8-c897d4f1cd53