X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=target.c;fp=target.c;h=12a219295beef77dbe8f9f4670c426c8c8ab7108;hp=0000000000000000000000000000000000000000;hb=c22cbe2672db2c95647c9412cfb4331d2be279a7;hpb=44d8db9e5aa86165c97289f6c78a7e42bac78362 diff --git a/target.c b/target.c new file mode 100644 index 000000000..12a219295 --- /dev/null +++ b/target.c @@ -0,0 +1,26 @@ +/*-*- Mode: C; c-basic-offset: 8 -*-*/ + +#include "name.h" +#include "target.h" +#include "load-fragment.h" + +static void target_done(Name *n) { + Target *m = TARGET(n); + + assert(m); + + /* Nothing here for now */ +} + +static NameActiveState target_active_state(Name *n) { + return TARGET(n)->state == TARGET_DEAD ? NAME_INACTIVE : NAME_ACTIVE; +} + +const NameVTable target_vtable = { + .suffix = ".target", + + .init = name_load_fragment, + .done = target_done, + + .active_state = target_active_state +};