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