From 96baa975d749de2580fd352473b8dde81e081f08 Mon Sep 17 00:00:00 2001 From: Balbir Singh Date: Sun, 11 May 2008 10:27:04 +0000 Subject: Merge with Dhaval's branch Signed-off-by: Balbir Singh git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@26 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- api.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'api.c') 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); } -- cgit