summaryrefslogtreecommitdiff
path: root/src/core/dbus-unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-01 02:45:02 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-01 02:45:02 +0200
commitd7550a6752be85f98408a86b7ae23a033e9b2983 (patch)
tree2f0088c426f8f3a091d944a832a3d04a4f84f7ef /src/core/dbus-unit.c
parent9f2e86af0600e99cff00d1c92f9bb8d38f29896a (diff)
core: move ControlGroup and Slice properties out of the dbus "Unit" interface
Slice/ControlGroup only really makes sense for unit types which actually have cgroups attached to them, hence move them out of the generic Unit interface and into the specific unit type interfaces. These fields will continue to be part of Unit though, simply because things are a log easier that way. However, regardless how this looks internally we should keep things clean and independent of the specific implementation of the inside.
Diffstat (limited to 'src/core/dbus-unit.c')
-rw-r--r--src/core/dbus-unit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 36c3abdb97..6273e46274 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -878,7 +878,6 @@ const BusProperty bus_unit_properties[] = {
{ "Id", bus_property_append_string, "s", offsetof(Unit, id), true },
{ "Names", bus_unit_append_names, "as", 0 },
{ "Following", bus_unit_append_following, "s", 0 },
- { "Slice", bus_unit_append_slice, "s", 0 },
{ "Requires", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_REQUIRES]), true },
{ "RequiresOverridable", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_REQUIRES_OVERRIDABLE]), true },
{ "Requisite", bus_unit_append_dependencies, "as", offsetof(Unit, dependencies[UNIT_REQUISITE]), true },
@@ -937,7 +936,11 @@ const BusProperty bus_unit_properties[] = {
{ "ConditionTimestampMonotonic", bus_property_append_usec, "t", offsetof(Unit, condition_timestamp.monotonic) },
{ "ConditionResult", bus_property_append_bool, "b", offsetof(Unit, condition_result) },
{ "LoadError", bus_unit_append_load_error, "(ss)", 0 },
- { "ControlGroup", bus_property_append_string, "s", offsetof(Unit, cgroup_path), true },
{ "Transient", bus_property_append_bool, "b", offsetof(Unit, transient) },
{ NULL, }
};
+
+const BusProperty bus_unit_cgroup_properties[] = {
+ { "Slice", bus_unit_append_slice, "s", 0 },
+ { "ControlGroup", bus_property_append_string, "s", offsetof(Unit, cgroup_path), true },
+};