summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2010-01-07 16:24:35 +0530
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2010-01-07 21:09:08 +0530
commit99ccdf671e9df5b13f646e1487393d562aa7fa62 (patch)
tree0e27f0b05ddcbb157dd48e2cfa24485dd1ad25b2 /include
parente1cc4cb97e00a1878541cc78bc3e5103a266da2e (diff)
downloadlibcg-99ccdf671e9df5b13f646e1487393d562aa7fa62.tar.gz
libcg-99ccdf671e9df5b13f646e1487393d562aa7fa62.tar.xz
libcg-99ccdf671e9df5b13f646e1487393d562aa7fa62.zip
libcgroup: Setup the namespace datastructures
This patch handles the validation of the newer configuration files. Some of the rules to be followed 1. We cannot have more controllers in the namespcae section than already mounted. 2. If more than one controller are mounted at the same point, then they will have the same namespace. In case it is not explicitly mentioned, the subsystems at the mount point will be set to the same namespace. This does not mean that controllers mounted at different points need to have the same namespace. Changes from v4: 1. Changed a variable name from mount to mount_path 2. Added more comments Changes from v3: 1. Removed most of the strdups 2. Fixed return values for errors Changes from v2: 1. mount and namespace keyword cannot come in the same file. Changes from v1: 1. Fix a bug where if a namespace was not defined, we were not exiting 2. Comment the validate namespace function 3. Make some of the variables more descriptive 4. Make namespace thread specific Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcgroup.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libcgroup.h b/include/libcgroup.h
index b58b2bb..d54d9c6 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -89,6 +89,9 @@ enum cgroup_errors {
ECGSENTINEL, /* Please insert further error codes above this */
ECGEOF, /* End of file, iterator */
ECGCONFIGPARSEFAIL,/* Failed to parse config file (cgconfig.conf). */
+ ECGNAMESPACEPATHS,
+ ECGNAMESPACECONTROLLER,
+ ECGMOUNTNAMESPACE,
};
#define ECGRULESPARSEFAIL ECGROUPPARSEFAIL