]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
cgrulesengd.c: loading of multiples files during init/reload
authorJan Chaloupka <jchaloup@redhat.com>
Thu, 19 Jun 2014 09:04:26 +0000 (11:04 +0200)
committerJan Chaloupka <jchaloup@redhat.com>
Thu, 19 Jun 2014 09:52:18 +0000 (11:52 +0200)
commit60f7e1a765acdcae269938795bdfb81ea1ce9485
tree2e7194a7067ae1b62cad7602405d2f3da04ab931
parent4dd7869510538fd9681a43f7a9061bbf2e73fab4
cgrulesengd.c: loading of multiples files during init/reload

This patch use new implementation. In cgrulesengd.c, static variable template_files is used to save all config files, i.e. /etc/cgconfig.conf and /etc/cgconfig.d/*. This list of files is then passed to cgroup_templates_cache_set_source_files, which saves files to template_files in config.c module. This list is accessed through invocation of cgroup_init_templates_cache_from_files and cgroup_reload_templates_cache_from_files, which can access variables only from config.c, thus presenting cgroup_templates_cache_set_source_files function. At the end, this list is set free.

Signed-off-by: Jan Chaloupka <jchaloup@redhat.com>
Acked-by: Ivana Hutarova Varekova <varekova@redhat.com>
src/daemon/cgrulesengd.c
src/libcgroup-internal.h
src/tools/tools-common.h