summaryrefslogtreecommitdiffstats
path: root/api.c
Commit message (Collapse)AuthorAgeFilesLines
* libcgroup: Better error reporting for libcgroupDhaval Giani2008-12-091-0/+32
| | | | | | | | | | | | | | | | 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
* Merge several bug-fixes and cleanups. No version bump yet, since this isBalbir Singh2008-10-151-21/+36
| | | | | | | | | | an ongoing exercise (after more testing, I'll recommend one). Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@216 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Change how cgroup_get_cgroup worksDhaval Giani2008-09-291-13/+25
| | | | | | | | | | | | | | Since we will not deprecate API now, and will do so with the next release, let's include this one in and get the API right. With this pathc, we now return int type, and the pointer passed as the argument redirects to the cgroup we are reading. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@202 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Configuration rewrite to use the main cgroups API and several bug fixesBalbir Singh2008-09-291-17/+73
| | | | | | | | | | | | | and configuration enhancements. Primarliy Initiated by Dhaval Giani Please see svn log of all branches/balbir-config-cleanup 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@201 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* The automatic classification engine (cgexec, cgclassify, pam_cgroup)Balbir Singh2008-09-291-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | classify tasks. It is useful for an application to know where it has been classified. I propose to add a new API cgroup_get_current_controller_path() that returns the current classification directory for the specified controller. One can easily add on and build new API that will return paths of all mounted controllers, but I want to start with something simple and useful. I've also added a bunch of test cases for the same purpose. Test output # ./pathtest.sh Test FAIL, get path failed for controller cpuset Test PASS, controller cpu path /default Test PASS, controller cpuacct path /default Test PASS, controller memory path /default Test FAIL, get path failed for controller memrlimit I mounted just cpu, cpuacct and memory, thus the path for cpuset and memrlimit could not be found (as expected). Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Reviewed-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@200 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Merge the cgruleseng daemon from Steve OlivieriBalbir Singh2008-09-261-180/+628
| | | | | | | | | | 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
* More fixes to the earlier attempt to create new cgroup inheriting parent'sBalbir Singh2008-08-221-16/+74
| | | | | | | | | | | 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-221-10/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Some libcgroup API cleanupsDhaval Giani2008-08-151-12/+9
| | | | | | | | | | | 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: 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
* 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: 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: New API interfaces for task placementDhaval Giani2008-08-131-0/+343
| | | | | | | | | | | | | | | | | | | | | | | 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: 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: 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: 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: Add new API to get cgroup data structure from filesystemDhaval Giani2008-08-061-0/+153
| | | | | | | | | | | | | | | | | 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: 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
* libcgroup: Ensure global data is protectedDhaval Giani2008-07-211-13/+44
| | | | | | | | | | | Add rwlock to ensure access to cg_mount_table is serialized. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@110 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Make libcgroup use rentrant functionsDhaval Giani2008-07-211-5/+15
| | | | | | | | | | | | | | | This patch converts functions which have reentrant versions to use those versions. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Paul Menage <menage@google.com> Cc: Dan Smith <danms@us.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@109 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: fix return value in cg_set_conrol_valueDhaval Giani2008-07-211-1/+1
| | | | | | | | | | We don't want to return errno as those results. Setting it to return a libcgroup error value. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@108 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix segmentation fault in cgroup_attach_task_pidDhaval Giani2008-07-081-1/+1
| | | | | | | | | | | | | From: Sudhir Kumar <skumar@linux.vnet.ibm.com> This patch fixes the segmentation fault in libcg api cgroup_attach_task() in case of multiple mounts. 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@103 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Handle null cgroups in APIsDhaval Giani2008-07-081-0/+9
| | | | | | | | | | | | | From: Sudhir Kumar <skumar@linux.vnet.ibm.com> [dhaval@linux.vnet.ibm.com]: correct error codes Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> 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@102 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: Sudhir Kumar <sudhir@linux.vnet.ibm.com>Dhaval Giani2008-07-011-4/+4
| | | | | | | | | | | This patch fixes the spell mistake in enum value in the header file and libcg api file. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@84 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Fix segmentation fault in APIs.Dhaval Giani2008-06-111-20/+13
| | | | | | | | | | | | | | | | | Dan Smith reported some segmentation faults. It turns out that we did not NULL terminate all the structures when we had moved to the wrapper based approach. With this in mind, the loop checks the index instead of a NULL structure. Also remove unwanted NULL terminations. Thanks to Dan for excellent debugging. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1c@77 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Some bugs were missed in v0.1b. Fixing those bugs and taggingDhaval Giani2008-06-101-6/+60
| | | | | | | | | v0.1c. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1c@76 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Fix more api.c warningsBalbir Singh2008-05-301-4/+12
| | | | | | | | Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@68 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Fix api.c warnings, include wrapper.c in Makefile. More changes toBalbir Singh2008-05-301-29/+7
| | | | | | | | | | | spec file based on bugzilla input. Removed %makeinstall 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/tags/v0.1b@67 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Add v0.1b tagBalbir Singh2008-05-241-22/+29
| | | | git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@49 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Multiple mount point support. Patches built on top of Dhaval'a patches.Balbir Singh2008-05-171-102/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Works for me on my testing. NOTE: The testing is insufficient as we only test cg_control_create_cgroup() and not delete_cgroup() or attach_task(). Sudhir's new test cases should really help Several coding style fixes and changes, enhancements to make the code work. NOTE: Since this is development release -DDEBUG is back in the makefile. Once this is committed, I'll bump up the version to 0.05 if no one objects. Test report ----------- debug log from the library matched cpuacct:cpuacct Found cgroup option rw,relatime,cpuacct, count 0 matched cpu:cpu Found cgroup option rw,relatime,cpu, count 1 tuid 0, tgid 0, cuid 1000, cgid 1000 path is /tmp/container_cpu/database/ path is /tmp/container_cpuacct/database/ NOTE: The database directory was created as expected on both mount points /tmp/container_cpu and /tmp/container_cpuacct balbir@localhost:~/deliverables/nextgen/libcg/branches/balbir/tests$ ls -al /tmp/container_cpuacct/ total 424 drwxrwxrwt 5 root root 0 2008-05-17 21:27 . drwxrwxrwt 32 root root 425984 2008-05-17 21:26 .. drwxr-xr-x 2 root root 0 2008-05-17 17:09 class1 drwxr-xr-x 2 balbir balbir 0 2008-05-17 17:09 class2 -rw-r--r-- 1 root root 0 2008-05-17 17:09 cpuacct.usage drwxr-xr-x 2 balbir balbir 0 2008-05-17 21:27 database -rw-r--r-- 1 root root 0 2008-05-17 17:09 notify_on_release -rw-r--r-- 1 root root 0 2008-05-17 17:09 releasable -rw-r--r-- 1 root root 0 2008-05-17 17:09 release_agent -rwxrwxrwx 1 root root 0 2008-05-17 17:09 tasks balbir@localhost:~/deliverables/nextgen/libcg/branches/balbir/tests$ ls -al /tmp/container_cpu total 424 drwxrwxrwt 5 root root 0 2008-05-17 21:27 . drwxrwxrwt 32 root root 425984 2008-05-17 21:26 .. drwxr-xr-x 2 root root 0 2008-05-17 17:09 class1 drwxr-xr-x 2 balbir balbir 0 2008-05-17 17:09 class2 -rw-r--r-- 1 root root 0 2008-05-17 17:09 cpu.rt_runtime_us -rw-r--r-- 1 root root 0 2008-05-17 17:09 cpu.shares drwxr-xr-x 2 balbir balbir 0 2008-05-17 21:27 database -rw-r--r-- 1 root root 0 2008-05-17 17:09 notify_on_release -rw-r--r-- 1 root root 0 2008-05-17 17:09 releasable -rw-r--r-- 1 root root 0 2008-05-17 17:09 release_agent -rwxrwxrwx 1 root root 0 2008-05-17 21:10 tasks 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/branches/balbir@30 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Remove merge comments and left overs from previous mergeBalbir Singh2008-05-111-15/+0
| | | | | | | | Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@27 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Merge with Dhaval's branchBalbir Singh2008-05-111-3/+16
| | | | | | | | | Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@26 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* chown recursive routines need to return zero on successBalbir Singh2008-04-211-3/+3
| | | | | | | | Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@19 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Miscellaneous scripts and libcg bug fixesBalbir Singh2008-04-181-2/+5
| | | | | | | | | | | | Turn off -DDEBUG in Makefile Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@18 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* api.c | 23 +++++++++++++++--------Balbir Singh2008-04-161-8/+15
| | | | | | | | | | | | | | libcg.h | 4 ++-- tests/libcg_ba.cpp | 2 +- Added additional parameters for create and destroy cgroup. Fixed a cg_init segfault (faulty, if-else check) Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@15 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Got recursive chown to work. API needs more changes to be able to ignoreBalbir Singh2008-04-121-7/+9
| | | | | | | | | | | | | ownership arguments. api.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@13 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Several bug fixes, some API enhancements.Balbir Singh2008-04-111-28/+133
| | | | | | | | | | | | | | | | | The first basic acceptance test is under development and first prototype is released api.c | 161 +++++++++++++++++++++++++++++++++++++++++++---------- libcg.h | 14 +--- tests/Makefile | 9 ++ tests/libcg_ba.cpp | 127 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 274 insertions(+), 37 deletions(-) Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@12 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* This patch fixes file handle leaks as noticed by Paul Menage.Balbir Singh2008-04-101-20/+8
| | | | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@8 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* This patch modifies libcg to use the new cgroup data structure.Balbir Singh2008-04-071-80/+70
| | | | | | | | | | Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> The code is yet to be tested though git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@7 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Dhaval's API changes, phase 1, prototypeBalbir Singh2008-04-051-0/+347
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@4 4f4bb910-9a46-0410-90c8-c897d4f1cd53