chiark / gitweb /
extend examples a bit
[elogind.git] / target.c
1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3 #include "unit.h"
4 #include "target.h"
5 #include "load-fragment.h"
6
7 static void target_done(Unit *u) {
8         Target *m = TARGET(u);
9
10         assert(m);
11
12         /* Nothing here for now */
13 }
14
15 static UnitActiveState target_active_state(Unit *u) {
16         return TARGET(u)->state == TARGET_DEAD ? UNIT_INACTIVE : UNIT_ACTIVE;
17 }
18
19 const UnitVTable target_vtable = {
20         .suffix = ".target",
21
22         .init = unit_load_fragment_and_dropin,
23         .done = target_done,
24
25         .active_state = target_active_state
26 };