summaryrefslogtreecommitdiff
path: root/target.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-06 02:43:58 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-06 02:43:58 +0200
commit23a177ef7c8c38c238ef06666f900f581b48298f (patch)
tree0e1467035854fea1a51c5efad2f69464ac2d402b /target.c
parent5af98f828476716954f327c479c4cf6321ae3fe4 (diff)
rework merging/loading logic
Diffstat (limited to 'target.c')
-rw-r--r--target.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/target.c b/target.c
index b18e50fe5..b8a7442f1 100644
--- a/target.c
+++ b/target.c
@@ -20,6 +20,7 @@
***/
#include <errno.h>
+#include <signal.h>
#include "unit.h"
#include "target.h"
@@ -36,18 +37,6 @@ static const char* const state_string_table[_TARGET_STATE_MAX] = {
[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);
@@ -100,7 +89,7 @@ static UnitActiveState target_active_state(Unit *u) {
const UnitVTable target_vtable = {
.suffix = ".target",
- .init = target_init,
+ .init = unit_load_fragment_and_dropin,
.dump = target_dump,