summaryrefslogtreecommitdiff
path: root/src/core/unit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-02-27 18:50:41 +0100
committerLennart Poettering <lennart@poettering.net>2013-02-27 18:50:41 +0100
commit26d04f86a36595e3565c74d67863e076c3e3c773 (patch)
tree374ba1bdf5dfc95a9c05df1232ffc44d8bd98397 /src/core/unit.h
parent416389f7ae262ae7a0848302e7a6516597f9fad1 (diff)
unit: rework resource management API
This introduces a new static list of known attributes and their special semantics. This means that cgroup attribute values can now be automatically translated from user to kernel notation for command line set settings, too. This also adds proper support for multi-line attributes.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r--src/core/unit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index c90210302d..17a5a5f0d9 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -40,6 +40,7 @@ typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
#include "condition.h"
#include "install.h"
#include "unit-name.h"
+#include "cgroup-semantics.h"
enum UnitActiveState {
UNIT_ACTIVE,
@@ -445,7 +446,7 @@ int unit_add_cgroup(Unit *u, CGroupBonding *b);
int unit_add_cgroup_from_text(Unit *u, const char *name, bool overwrite, CGroupBonding **ret);
int unit_add_default_cgroups(Unit *u);
CGroupBonding* unit_get_default_cgroup(Unit *u);
-int unit_add_cgroup_attribute(Unit *u, const char *controller, const char *name, const char *value, CGroupAttributeMapCallback map_callback, CGroupAttribute **ret);
+int unit_add_cgroup_attribute(Unit *u, const CGroupSemantics *semantics, const char *controller, const char *name, const char *value, CGroupAttribute **ret);
int unit_choose_id(Unit *u, const char *name);
int unit_set_description(Unit *u, const char *description);