X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fcgroup-attr.h;h=3a13b7c92dde811c8d9ab700f23119f4d19d271d;hb=abb26902e424c4142b68ead35676028b12249b77;hp=2b754eac405a45cdc8842cb230c50db35769dc57;hpb=f274ece0f76b5709408821e317e87aef76123db6;p=elogind.git diff --git a/src/core/cgroup-attr.h b/src/core/cgroup-attr.h index 2b754eac4..3a13b7c92 100644 --- a/src/core/cgroup-attr.h +++ b/src/core/cgroup-attr.h @@ -23,17 +23,18 @@ typedef struct CGroupAttribute CGroupAttribute; -typedef int (*CGroupAttributeMapCallback)(const char *controller, const char*name, const char *value, char **ret); - #include "unit.h" #include "cgroup.h" +#include "cgroup-semantics.h" struct CGroupAttribute { char *controller; char *name; char *value; - CGroupAttributeMapCallback map_callback; + Unit *unit; + + const CGroupSemantics *semantics; LIST_FIELDS(CGroupAttribute, by_unit); }; @@ -41,6 +42,9 @@ struct CGroupAttribute { int cgroup_attribute_apply(CGroupAttribute *a, CGroupBonding *b); int cgroup_attribute_apply_list(CGroupAttribute *first, CGroupBonding *b); -CGroupAttribute *cgroup_attribute_find_list(CGroupAttribute *first, const char *controller, const char *name); +bool cgroup_attribute_matches(CGroupAttribute *a, const char *controller, const char *name) _pure_; +CGroupAttribute *cgroup_attribute_find_list(CGroupAttribute *first, const char *controller, const char *name) _pure_; +void cgroup_attribute_free(CGroupAttribute *a); void cgroup_attribute_free_list(CGroupAttribute *first); +void cgroup_attribute_free_some(CGroupAttribute *first, const char *controller, const char *name);