return ret;
}
- memcpy(template_table, config_template_table,
- template_table_index * sizeof(struct cgroup));
+ for (i = 0; i < template_table_index; i++) {
+ cgroup_copy_cgroup(&config_template_table[i], &template_table[i]);
+ }
return ret;
}
int cgroup_init_templates_cache(char *pathname)
{
int ret = 0;
+ int i;
if (config_template_table_index != 0) {
/* config structures have to be clean */
return ret;
}
- memcpy(template_table, config_template_table,
- template_table_index * sizeof(struct cgroup));
+ for (i = 0; i < template_table_index; i++) {
+ cgroup_copy_cgroup(&config_template_table[i], &template_table[i]);
+ }
return ret;