diff options
author | Jan Safranek <jsafrane@redhat.com> | 2009-10-29 15:47:52 +0100 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-11-01 03:09:08 +0530 |
commit | 4efb9b682b6133a13044c1f70aa96de1fd64c36c (patch) | |
tree | d6e83dbb60f6350c1b8c3e5d78cc349e86d2a731 /src/tools/tools-common.h | |
parent | a05baf9beb7c3a87b286c36553db3f5377a9d2de (diff) | |
download | libcg-4efb9b682b6133a13044c1f70aa96de1fd64c36c.tar.gz libcg-4efb9b682b6133a13044c1f70aa96de1fd64c36c.tar.xz libcg-4efb9b682b6133a13044c1f70aa96de1fd64c36c.zip |
Remove the CG_HIER_MAX from tools-common
Some libcgroup tools are limited to CG_HIER_MAX arguments. This hard limit
is suitable only to some of the tools, namely cgdelete and cgcreate should not
be limited to any particular numbers of groups to create/delete.
This patches removes the hard limit from tools-common.c and puts it to the
individual tools.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Diffstat (limited to 'src/tools/tools-common.h')
-rw-r--r-- | src/tools/tools-common.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/tools-common.h b/src/tools/tools-common.h index 65d87c7..752eb57 100644 --- a/src/tools/tools-common.h +++ b/src/tools/tools-common.h @@ -41,14 +41,16 @@ struct cgroup_group_spec { * The option must have form of 'controller1,controller2,..:group_name'. * * The parsed list of controllers and group name is added at the end of - * provided cdptr. + * provided cdptr, i.e. on place of first NULL cgroup_group_spec*. * * @param cdptr Target data structure to fill. New item is allocated and added * at the end. * @param optarg Argument to parse. + * @param capacity Capacity of the cdptr array. * @return 0 on success, != 0 on error. */ -int parse_cgroup_spec(struct cgroup_group_spec *cdptr[], char *optarg); +int parse_cgroup_spec(struct cgroup_group_spec **cdptr, char *optarg, + int capacity); /** * Free a single cgroup_group_spec structure. |