X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=milestone.c;h=fd4a6897ba4f7ef06134730c24fec8576da5cc18;hb=034c6ed7da5e44bfdde5a5d0da75f7b7a59953b8;hp=ad8080aefc2ab59c3f124aeb2e32dd82de5e81d3;hpb=9152c765065184d0c1267ed2499e3fe4cac53755;p=elogind.git diff --git a/milestone.c b/milestone.c index ad8080aef..fd4a6897b 100644 --- a/milestone.c +++ b/milestone.c @@ -4,11 +4,7 @@ #include "milestone.h" #include "load-fragment.h" -static NameActiveState milestone_active_state(Name *n) { - return MILESTONE(n)->state == MILESTONE_DEAD ? NAME_INACTIVE : NAME_ACTIVE; -} - -static void milestone_free_hook(Name *n) { +static void milestone_done(Name *n) { Milestone *m = MILESTONE(n); assert(m); @@ -16,17 +12,15 @@ static void milestone_free_hook(Name *n) { /* Nothing here for now */ } +static NameActiveState milestone_active_state(Name *n) { + return MILESTONE(n)->state == MILESTONE_DEAD ? NAME_INACTIVE : NAME_ACTIVE; +} + const NameVTable milestone_vtable = { .suffix = ".milestone", - .load = name_load_fragment, - .dump = NULL, - - .start = NULL, - .stop = NULL, - .reload = NULL, - - .active_state = milestone_active_state, + .init = name_load_fragment, + .done = milestone_done, - .free_hook = milestone_free_hook + .active_state = milestone_active_state };