]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcgroup: Setup the namespace datastructures
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Thu, 7 Jan 2010 10:54:35 +0000 (16:24 +0530)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Thu, 7 Jan 2010 15:39:08 +0000 (21:09 +0530)
commit99ccdf671e9df5b13f646e1487393d562aa7fa62
tree0e27f0b05ddcbb157dd48e2cfa24485dd1ad25b2
parente1cc4cb97e00a1878541cc78bc3e5103a266da2e
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>
include/libcgroup.h
src/api.c
src/config.c
src/libcgroup-internal.h