summaryrefslogtreecommitdiffstats
path: root/config.c
Commit message (Collapse)AuthorAgeFilesLines
* Distribute files to various subdirectoriesJan Safranek2009-03-261-496/+0
| | | | Signed-off-by: Jan Safranek <jsafrane@redhat.com>
* libcgroup: Initialize buffer in config.cDhaval Giani2009-03-041-1/+2
| | | | | | | | Fix the warning, config.c: In function ‘cgroup_config_parse_controller_options’: config.c:104: warning: ‘buffer’ may be used uninitialized in this function Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
* libcgroup: Rename dbg() to cgroup_dbg()Dhaval Giani2009-02-251-11/+13
| | | | | | | | | | | | | From: Jan Safranek <jsafrane@redhat.com> Rename dbg() to cgroup_dbg() everywhere. Signed-off-by: Jan Safranek <jsafrane@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@345 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Impact: Fix the parsing issue when two or more values are specifiedBalbir Singh2009-02-211-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* This patch store the last errno value to last_errno value and addBalbir Singh2009-02-161-3/+9
| | | | | | | | | | | | cgroup_add_last_errno procedure to show this number. Use this procedure to show the cause of the error when ECGOTHER is returned. [balbir@linux.vnet.ibm.com: fix last_errno in config.c] Signed-off-by: Ivana Varekova <varekova@redhat.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@329 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* From: SanjayKumar J <vjsanjay@gmail.com>Balbir Singh2008-12-011-2/+2
| | | | | | | | | | | | | | Consistent Error checking for group_admin_perm Signed-off-by: SanjayKumar J <vjsanjay@gmail.com> Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> [Balbir - change prefix in Makefile to /usr, so that make install does sensible things] git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@226 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Merge several bug-fixes and cleanups. No version bump yet, since this isBalbir Singh2008-10-151-0/+4
| | | | | | | | | | an ongoing exercise (after more testing, I'll recommend one). Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@216 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Configuration rewrite to use the main cgroups API and several bug fixesBalbir Singh2008-09-291-552/+302
| | | | | | | | | | | | | and configuration enhancements. Primarliy Initiated by Dhaval Giani Please see svn log of all branches/balbir-config-cleanup Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@201 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Fix configuration assert when multiple controllers are enabledDhaval Giani2008-08-141-1/+1
| | | | | | | | | | | | | | | Since we support multiple controllers, asserting is no longer a good idea. TODO: Support other controllers, memory, cpu and cpuacct (possibly cpusets as well). Well, this code is obsolete and will be replaced by the newer cgroup API. Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@152 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* libcgroup: Configuration and parsing updates (v2)Dhaval Giani2008-08-131-18/+24
| | | | | | | | | | | | | | | | | | | | | Dhaval, wanted a patch with -p1 generated so that he can apply it and use it with quilt. Here goes Testing Tested with samples/cgconfig.conf (NOTE: expects user balbir to be present on the system, feel free to change and test). TODO 1. Add hooks for other controllers, namely memory, cpuacct and cpuset Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@134 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* Add v0.1b tagBalbir Singh2008-05-241-1/+1
| | | | git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@49 4f4bb910-9a46-0410-90c8-c897d4f1cd53
* First initial revision. Look for TODOs and BUGsBalbir Singh2008-03-191-0/+704
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/src@1 4f4bb910-9a46-0410-90c8-c897d4f1cd53