chiark / gitweb /
bus: add .busname unit type to implement kdbus-style bus activation
[elogind.git] / src / core / target.c
index 981424132be6435129fe0911f30583fca80b8dca..68be22b38df3acf149afc52ab8f78e7550392fc9 100644 (file)
@@ -184,13 +184,13 @@ static int target_deserialize_item(Unit *u, const char *key, const char *value,
         return 0;
 }
 
-static UnitActiveState target_active_state(Unit *u) {
+_pure_ static UnitActiveState target_active_state(Unit *u) {
         assert(u);
 
         return state_translation_table[TARGET(u)->state];
 }
 
-static const char *target_sub_state_to_string(Unit *u) {
+_pure_ static const char *target_sub_state_to_string(Unit *u) {
         assert(u);
 
         return target_state_to_string(TARGET(u)->state);
@@ -205,6 +205,7 @@ DEFINE_STRING_TABLE_LOOKUP(target_state, TargetState);
 
 const UnitVTable target_vtable = {
         .object_size = sizeof(Target),
+
         .sections =
                 "Unit\0"
                 "Target\0"
@@ -225,7 +226,7 @@ const UnitVTable target_vtable = {
         .sub_state_to_string = target_sub_state_to_string,
 
         .bus_interface = "org.freedesktop.systemd1.Target",
-        .bus_message_handler = bus_target_message_handler,
+        .bus_vtable = bus_target_vtable,
 
         .status_message_formats = {
                 .finished_start_job = {