summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2009-03-04 16:59:49 +0530
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-03-04 16:59:49 +0530
commit2669880a2f59609269aadde8546385e10b0519d1 (patch)
tree34b39fd0d94f4edf7ac1c26be9b945f9bd298554
parenta0012d643c8b2df5506a19a7322fe9cb8321aa3f (diff)
downloadlibcg-2669880a2f59609269aadde8546385e10b0519d1.tar.gz
libcg-2669880a2f59609269aadde8546385e10b0519d1.tar.xz
libcg-2669880a2f59609269aadde8546385e10b0519d1.zip
libcgroup: Removed unused functions from api.c
api.c: At top level: api.c:1780: warning: ‘cg_prepare_controller_array’ defined but not used api.c:1805: warning: ‘cg_free_controller_array’ defined but not used Turns out no one is using this functions. Remove them. Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
-rw-r--r--api.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/api.c b/api.c
index 1883987..4745142 100644
--- a/api.c
+++ b/api.c
@@ -1770,51 +1770,6 @@ static int cg_prepare_cgroup(struct cgroup *cgroup, pid_t pid,
}
/**
- * This function takes a string which has got list of controllers separated
- * by commas and it converts it to an array of string pointer where each
- * string contains name of one controller.
- *
- * returns 0 on success.
- */
-static int cg_prepare_controller_array(char *cstr, char *controllers[])
-{
- int j = 0;
- char *temp = NULL;
- char *saveptr = NULL;
-
- do {
- if (j == 0)
- temp = strtok_r(cstr, ",", &saveptr);
- else
- temp = strtok_r(NULL, ",", &saveptr);
-
- if (temp) {
- controllers[j] = strdup(temp);
- if (!controllers[j]) {
- last_errno = errno;
- return ECGOTHER;
- }
- }
- j++;
- } while (temp);
- return 0;
-}
-
-
-static void cg_free_controller_array(char *controllers[])
-{
- int j = 0;
-
- /* Free up temporary controllers array */
- for (j = 0; j < CG_CONTROLLER_MAX; j++) {
- if (!controllers[j])
- break;
- free(controllers[j]);
- controllers[j] = 0;
- }
-}
-
-/**
* Finds the first rule in the cached list that matches the given UID or GID,
* and returns a pointer to that rule. This function uses rl_lock.
*