[CRIU] [PATCH 2/2] cg: Add ability to dump custom cgroup properties

Pavel Emelyanov xemul at virtuozzo.com
Thu Apr 14 06:07:34 PDT 2016


>>>  const cgp_t *cgp_get_props(const char *name)
>>>  {
>>> +	cgp_list_t *p;
>>>  	size_t i;
>>>  
>>>  	for (i = 0; i < ARRAY_SIZE(cgp_predefined); i++) {
>>> @@ -107,5 +289,19 @@ const cgp_t *cgp_get_props(const char *name)
>>>  			return &cgp_predefined[i];
>>>  	}
>>>  
>>> +	list_for_each_entry(p, &cgp_list, list) {
>>> +		if (!strcmp(p->cgp.name, name))
>>> +			return &p->cgp;
>>
>> This makes it impossible to override existing built-in prop lists.
> 
> Do we really want to override predefined prop list?

Not only override, but also extend I would say ;)



More information about the CRIU mailing list