X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=target.c;h=b8a7442f1c44b39100bf8f0678ab42c2a3c29d7e;hp=b18e50fe5bdf756e49f8bee3fd657ff14f2f7fb5;hb=37d88da701d75a3893b262580dc59042147a9b89;hpb=a7334b0952ab66c17ee787e36e6d2c5ceb387de6 diff --git a/target.c b/target.c index b18e50fe5..b8a7442f1 100644 --- a/target.c +++ b/target.c @@ -20,6 +20,7 @@ ***/ #include +#include #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,