]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Impact: Fix the parsing issue when two or more values are specified
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Sat, 21 Feb 2009 15:34:24 +0000 (15:34 +0000)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Sat, 21 Feb 2009 15:34:24 +0000 (15:34 +0000)
commit74f9a91b6bccc558ed90d02ae15cd2c9d49267cb
tree761cdbbea233d06a9b4317fb77be6fc6880fd166
parent5ef29f580daf9c8d5e6a8af096fb30b1cf9a3aa5
Impact: Fix the parsing issue when two or more values are specified

This patch fixes an issue where when two or more values are specified for
the controllers, only the last one is applied. This patch fixes that issue.
The parser is modified to collate all the name value pairs, seperated by
":". The reason for implementing it this way is because we need to pass
the controller name and splitting the rules would make it very hard to pass
the controller name to each rule, irrespective of where the controller name
was parsed.

Tested with the following config file

group default {
perm {
task {
uid = root;
gid = root;
}
admin {
uid = root;
gid = root;
}
}

cpu {
cpu.shares = 2048;
}

cpuset {
cpuset.mems=0;
cpuset.cpus=0-1;
}
}

mount {
cpu = /cgroup/cpu;
cpuacct = /cgroup/cpu;
cpuset = /cgroup/cpu;
}

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@336 4f4bb910-9a46-0410-90c8-c897d4f1cd53
config.c
parse.y