]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/target.c
util-lib: split our string related calls from util.[ch] into its own file string...
[thirdparty/systemd.git] / src / core / target.c
index 8817ef21c4c61a3daba8d24b717e9a3c19f83406..c3e79fffc8d1f7016baa31c1b1cf613b11e35577 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-
-#include "unit.h"
-#include "target.h"
-#include "log.h"
 #include "dbus-target.h"
+#include "log.h"
 #include "special.h"
+#include "string-util.h"
 #include "unit-name.h"
+#include "unit.h"
+#include "target.h"
 
 static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = {
         [TARGET_DEAD] = UNIT_INACTIVE,
@@ -192,13 +192,6 @@ _pure_ static const char *target_sub_state_to_string(Unit *u) {
         return target_state_to_string(TARGET(u)->state);
 }
 
-static const char* const target_state_table[_TARGET_STATE_MAX] = {
-        [TARGET_DEAD] = "dead",
-        [TARGET_ACTIVE] = "active"
-};
-
-DEFINE_STRING_TABLE_LOOKUP(target_state, TargetState);
-
 const UnitVTable target_vtable = {
         .object_size = sizeof(Target),
 
@@ -221,13 +214,11 @@ const UnitVTable target_vtable = {
         .active_state = target_active_state,
         .sub_state_to_string = target_sub_state_to_string,
 
-        .bus_interface = "org.freedesktop.systemd1.Target",
         .bus_vtable = bus_target_vtable,
 
         .status_message_formats = {
                 .finished_start_job = {
                         [JOB_DONE]       = "Reached target %s.",
-                        [JOB_DEPENDENCY] = "Dependency failed for %s.",
                 },
                 .finished_stop_job = {
                         [JOB_DONE]       = "Stopped target %s.",