[Libcg-devel] [RFC/RFT patch 3/4] cgrules: Split apart cgrules_parse_rules

2011-02-07 Thread Dhaval Giani
Add a wrapper, so that we can then be ready for the cgrules configuration directory. Signed-off-by: Dhaval Giani --- src/cgrules.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) Index: libcg/src/cgrules.c === -

[Libcg-devel] [RFC/RFT patch 2/4] cgrules: Use an arbitrary configuration file

2011-02-07 Thread Dhaval Giani
Till now, cgrulesengd had a fixed configuration file at /etc/cgrules.conf. Not exactly being sure why we made it static, its quite straightforward to make it an arbitrary file. Do so. It is also a nice thing since the next patch makes it possible to load multiple configuration files one after the

[Libcg-devel] [RFC/RFT patch 4/4] cgrulesengd: Allow configuration directory to be specified

2011-02-07 Thread Dhaval Giani
As per the discussion on the mailing list, the daemon should have the ability to load both configuration files and configuration directories. Provide this ability. TODO: 1. Move to a fts based walk as opposed to a readdir. 2. Decide whether a configuration file is default or a configuration direc

[Libcg-devel] [RFC/RFT patch 1/4] libcgroup: Move the cgrules API to its own file

2011-02-07 Thread Dhaval Giani
api.c was pretty big already and quite hard to maintain. Split it apart with a separate file in order to make it a bit easier to keep track of the rules as opposed to anything else. Signed-off-by: Dhaval Giani Cc: Vivek Goyal --- src/Makefile.am |2 src/api.c| 938

[Libcg-devel] [RFC/RFT patch 0/4] Make cgrules configuration directory aware

2011-02-07 Thread Dhaval Giani
Happy new year folks! This is the newest version of the configuration directory for cgrules. It still needs to be tested. I am not confident about it since I don't have a lot of cases where I use the cgrules daemon. I hope to have a working cgrulesengd on my system in a day or two, when this will