+#include "log.h"
+
+static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = {
+ [TARGET_DEAD] = UNIT_INACTIVE,
+ [TARGET_ACTIVE] = UNIT_ACTIVE
+};
+
+static const char* const state_string_table[_TARGET_STATE_MAX] = {
+ [TARGET_DEAD] = "dead",
+ [TARGET_ACTIVE] = "active"
+};
+
+static int target_init(Unit *u) {
+ int r;
+ assert(u);
+
+ /* Make sure this config file actually exists */
+
+ if ((r = unit_load_fragment_and_dropin(u)) <= 0)
+ return r < 0 ? r : -ENOENT;
+
+ return 0;
+}
+
+static void target_dump(Unit *u, FILE *f, const char *prefix) {
+ Target *t = TARGET(u);
+
+ assert(t);
+ assert(f);
+
+ fprintf(f,
+ "%sTarget State: %s\n",
+ prefix, state_string_table[t->state]);
+}
+
+static void target_set_state(Target *t, TargetState state) {
+ TargetState old_state;
+ assert(t);