diff options
author | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2008-12-22 18:52:08 +0000 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2008-12-22 18:52:08 +0000 |
commit | c708d29de09ac3f223e25481af98e33426b15415 (patch) | |
tree | f13e88103f1f3c8892f570ef59e91c1185e647b8 /tests/libcgrouptest.h | |
parent | fdaf63f9d49e4ed53a6dc9238856cbf8c663c2e1 (diff) | |
download | libcg-c708d29de09ac3f223e25481af98e33426b15415.tar.gz libcg-c708d29de09ac3f223e25481af98e33426b15415.tar.xz libcg-c708d29de09ac3f223e25481af98e33426b15415.zip |
libcgroup: create function for cgroup_new_cgroup
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
This patch creates the function create_new_cgroup_ds(), to create a well
populated cgroup structure, and this way eliminates lot of redundant
code. This function internaly call other functions to provide a complete
cgroup structure. This patch breaks one of the testcases because of
the global data being used. I have fixed that in the dame patch to
maintain uniformity as this is a single line fix only and is well
commented in the code.
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@283 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcgrouptest.h')
-rw-r--r-- | tests/libcgrouptest.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h index 73b25e3..e5a1f14 100644 --- a/tests/libcgrouptest.h +++ b/tests/libcgrouptest.h @@ -81,6 +81,8 @@ void test_cgroup_init(int retcode, int i); void test_cgroup_attach_task(int retcode, struct cgroup *cgroup1, const char *group1, const char *group2, int fs_info, int k, int i); +struct cgroup *create_new_cgroup_ds(int ctl, const char *grpname, + int value_type, int i); /* API test functions end here */ void test_cgroup_compare_cgroup(int ctl1, int ctl2, int i); @@ -93,7 +95,7 @@ static int group_modified(char *path_control_file, int value_type); static int add_control_value(struct cgroup_controller *newcontroller, char * control_file, char *wr, int value_type); struct cgroup *new_cgroup(char *group, char *controller_name, - char *control_file, int value_type); + char *control_file, int value_type, int i); int check_fsmounted(int multimnt); static int check_task(char *tasksfile); /* function to print messages in better format */ |