summaryrefslogtreecommitdiffstats
path: root/api.c
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2008-05-11 10:27:04 +0000
committerBalbir Singh <balbir@linux.vnet.ibm.com>2008-05-11 10:27:04 +0000
commit96baa975d749de2580fd352473b8dde81e081f08 (patch)
tree89c594b70da1b43a00876d86d6d89e5ff1789c02 /api.c
parente62a201d4da2deadf021e5bc7b80f5fc7de44c7b (diff)
downloadlibcg-96baa975d749de2580fd352473b8dde81e081f08.tar.gz
libcg-96baa975d749de2580fd352473b8dde81e081f08.tar.xz
libcg-96baa975d749de2580fd352473b8dde81e081f08.zip
Merge with Dhaval's branch
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
Diffstat (limited to 'api.c')
-rw-r--r--api.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/api.c b/api.c
index 9f144a3..b154de1 100644
--- a/api.c
+++ b/api.c
@@ -321,9 +321,8 @@ int cg_modify_cgroup(struct cgroup *cgroup)
for (i = 0; i < CG_CONTROLLER_MAX && cgroup->controller[i];
i++, strcpy(path, base)) {
int j;
- for(j = 0; j < CG_NV_MAX &&
- cgroup->controller[i]->values[j];
- j++, strcpy(path, base)) {
+ for(j = 0; j < CG_NV_MAX && cgroup->controller[i]->values[j];
+ j++, strcpy(path, base)) {
strcat(path, cgroup->controller[i]->values[j]->name);
error = cg_set_control_value(path,
cgroup->controller[i]->values[j]->value);
@@ -362,9 +361,15 @@ int cg_create_cgroup(struct cgroup *cgroup, int ignore_ownership)
strcpy(base, path);
+<<<<<<< .mine
+ if (!ignore_ownership)
+ cg_chown_recursive(fts_path, cgroup->control_uid,
+ cgroup->control_gid);
+=======
if (!ignore_ownership)
error = cg_chown_recursive(fts_path, cgroup->control_uid,
cgroup->control_gid);
+>>>>>>> .r18
if (error)
goto err;
@@ -401,7 +406,11 @@ err:
*
* returns 0 on success.
*/
+<<<<<<< .mine
+int cg_delete_cgroup(struct cgroup *cgroup, int ignore_tasks)
+=======
int cg_delete_cgroup(struct cgroup *cgroup, int ignore_migration)
+>>>>>>> .r18
{
FILE *delete_tasks, *base_tasks;
int tids;
@@ -434,7 +443,11 @@ int cg_delete_cgroup(struct cgroup *cgroup, int ignore_migration)
del_open_err:
fclose(base_tasks);
base_open_err:
+<<<<<<< .mine
+ if (ignore_tasks) {
+=======
if (ignore_migration) {
+>>>>>>> .r18
cg_build_path(cgroup->name, path);
error = rmdir(path);
}